New Fluxzy v2 just shipped. Electron is out, Tauri is in. gRPC ready, 3x smaller install. Learn more

statusCodeRedirectionFilter Filter

Select exchanges whose response status code falls in the 3XX redirection range, including 301, 302, 304 and the rest of the redirect family.

statusCodeRedirectionFilter is the concise way to surface every 3XX response in a Fluxzy session. Combine it with capture and tagging actions to build a redirection audit, or pair it with statusCodeFilter for precise per code rules.

When to use this filter

Use statusCodeRedirectionFilter when you want a rule that fires for any 3XX response, which covers permanent redirects, temporary redirects, not modified responses and the rest of the redirection family.

Typical situations:

  • Auditing every redirect that your traffic encounters to detect unwanted loops or HTTP to HTTPS upgrades you did not expect.
  • Tagging 3XX responses so you can pivot the timeline by redirection chain.
  • Capturing redirection responses in a dedicated session before they are followed by the client.

The filter evaluates on the responseHeaderReceivedFromRemote scope, so the status line is already parsed when it runs. Use statusCodeFilter if you only care about a specific code such as 301 or 304.

Real world examples

Tag every redirection response

Apply a tag to any 3XX exchange so you can build a saved view of all redirection traffic in a session.

rules:
- filter:
    typeKind: StatusCodeRedirectionFilter
  actions:
  - typeKind: ApplyTagAction
    tag:
      value: redirection

Capture every redirect to a dedicated session

Send all 3XX responses to a separate capture so the redirection chain can be replayed and inspected offline.

rules:
- filter:
    typeKind: StatusCodeRedirectionFilter
  actions:
  - typeKind: CaptureSessionAction

Add a header that documents the redirect source

Annotate every 3XX response with a custom header that names the rule, useful when several teams maintain different parts of the same site.

rules:
- filter:
    typeKind: StatusCodeRedirectionFilter
  actions:
  - typeKind: AddResponseHeaderAction
    headerName: X-Redirect-Audit
    headerValue: 'observed-by-fluxzy'

Reference

statusCodeRedirectionFilter

Description

Select exchanges that HTTP status code indicates a redirect (3XX).

Evaluation scope

Evaluation scope defines the timing where this filter will be applied.

responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.

YAML configuration name

statusCodeRedirectionFilter

Settings

This filter has no specific characteristic

The following table describes the customizable properties available for this filter:

Property Type Description DefaultValue
inverted boolean Negate the filter result false

Example of usage

The following examples apply a comment to the filtered exchange

Select exchanges that HTTP status code indicates a redirect (3XX).

rules:
- filter:
    typeKind: StatusCodeRedirectionFilter
  actions:
  - typeKind: ApplyCommentAction
    comment: filter was applied

.NET reference

View definition of StatusCodeRedirectionFilter for .NET integration.

See also

The following filters are related to this filter:

Frequently asked questions

Which codes are covered?

Every code in the 300 to 399 range, including 301, 302, 303, 304, 307 and 308.

Does the filter follow the redirect?

No. The filter only matches the redirect response itself. Whether the client follows the Location header is decided by the client, not by Fluxzy.

How do I match only permanent redirects?

Use statusCodeFilter with statusCodes set to [301, 308]. statusCodeRedirectionFilter is intentionally broader, it covers every 3XX code.

Can I exclude 3XX traffic from another rule?

Yes, set inverted: true. The rule then fires for every response that is not in the 3XX range.

Learn more about Fluxzy rules