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

rejectAction Action

Reply with a flat HTTP 403 Forbidden for any exchange that matches the filter, with no configuration and no upstream call.

When you need traffic to stop and you do not care what the client sees beyond a refusal, rejectAction is the right tool. It is the cheapest way to put a wall in front of a hostname or path while keeping the rest of your capture session running.

When to use this action

rejectAction is the simplest blocking primitive in Fluxzy. It returns a plain HTTP 403 and never reaches the upstream server. Use it when you do not care about the response body and just want to make sure the traffic stops.

Typical fits:

  • Block telemetry, analytics, and tracker hostnames during local debugging sessions.
  • Enforce a denylist of internal services that test environments should never call.
  • Simulate a downstream firewall that refuses connections to a given host.

If you need a custom status code or a body payload, pick rejectWithStatusCodeAction or rejectWithMessageAction instead.

Real world examples

Block a tracker host across all paths

Stops every request to the tracker hostname with a 403 so you can verify the rest of the application still works without telemetry.

rules:
- filter:
    typeKind: HostFilter
    pattern: tracker.example.com
  actions:
  - typeKind: RejectAction

Deny access to a deprecated API path

Useful when teams should migrate to a new endpoint. Combine a host filter with a path filter so only the legacy route is denied.

rules:
- filter:
    typeKind: FilterCollection
    operation: And
    children:
    - typeKind: HostFilter
      pattern: api.internal.example.com
    - typeKind: PathFilter
      pattern: ^/v1/legacy
  actions:
  - typeKind: RejectAction

Block third party CDN assets in a clean test

Confirm an application still renders correctly without external CDN dependencies by returning 403 for every request to the CDN host.

rules:
- filter:
    typeKind: HostFilter
    pattern: cdn.example.com
  actions:
  - typeKind: RejectAction

Reference

rejectAction

Description

Block the request and return HTTP 403 Forbidden response. Use this action to explicitly deny access to specific resources. This is a simple blocking action with no configuration required.

Evaluation scope

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

requestHeaderReceivedFromClient This scope occurs the moment fluxzy parsed the request header receiveid from client

YAML configuration name

rejectAction

Settings

This action has no specific characteristic

Example of usage

The following examples apply this action to any exchanges

Block access to a specific domain.

rules:
- filter:
    typeKind: AnyFilter
  actions:
  - typeKind: RejectAction

.NET reference

View definition of RejectAction for .NET integration.

See also

The following actions are related to this action:

Frequently asked questions

What does the client see when this action fires?

A standard HTTP 403 Forbidden response with no body. The client never reaches the upstream server, so no traffic leaves your machine for the blocked host.

How is this different from abortAction?

abortAction terminates the connection abruptly, while rejectAction returns a clean HTTP 403. Reach for rejectAction when you want the client to see a structured response, abortAction when you want to simulate a network failure.

Can I add a body or explanation to the 403 response?

Not with this action. Use rejectWithMessageAction if you want a custom body, or mockedResponseAction for full control over headers and content.

Does the upstream server know about the blocked request?

No. Fluxzy short circuits the exchange right after parsing the client request, so nothing leaves the proxy.

Learn more about Fluxzy rules