Reverse proxy patterns usually require a dedicated server like nginx or HAProxy. forwardAction collapses that work into a single YAML rule, which is enough for migrations, debugging sessions, and ad hoc routing. Pair it with filters to target precisely the traffic you want to send elsewhere.
Use forwardAction when you want Fluxzy to behave like a reverse proxy and send matching requests to a completely different URL. Unlike spoofDnsAction, this action rewrites the Host header automatically and supports protocol switching, including HTTP to HTTPS and HTTP/1.1 to HTTP/2.
Typical situations include:
The action runs on the requestHeaderReceivedFromClient scope. The url property must be an absolute URL including scheme, for example https://target.example.com.
Useful during a migration when the client still calls the old URL.
rules:
- filter:
typeKind: HostFilter
pattern: legacy.example.com
actions:
- typeKind: ForwardAction
url: https://new.example.com
Splits one host across two upstreams using a path based rule.
rules:
- filter:
typeKind: FilterCollection
operation: And
children:
- typeKind: HostFilter
pattern: api.internal.example.com
- typeKind: PathFilter
pattern: /v2/
actions:
- typeKind: ForwardAction
url: https://api-v2.internal.example.com
Lets you debug a service locally without reconfiguring TLS in your client.
rules:
- filter:
typeKind: HostFilter
pattern: payments.example.com
actions:
- typeKind: ForwardAction
url: http://localhost:5000
Forward request to a specific URL. This action makes fluxzy act as a reverse proxy. Unlike SpoofDnsAction, host header is automatically set and protocol switch is supported (http to https, http/1.1 to h2, ...). The URL must be an absolute path.
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
forwardAction
The following table describes the customizable properties available for this action:
| Property | Type | Description | DefaultValue |
|---|---|---|---|
| url | string |
The following examples apply this action to any exchanges
Forward any request to https://www.example.com.
rules:
- filter:
typeKind: AnyFilter
actions:
- typeKind: ForwardAction
url: https://www.example.com
View definition of ForwardAction for .NET integration.
The following actions are related to this action:
Yes. Fluxzy sets the Host header to match the destination URL so the upstream server sees a coherent request.
spoofDnsAction changes only the DNS resolution. forwardAction acts like a full reverse proxy: it rewrites Host, supports protocol switching, and points to an absolute URL.
The destination URL replaces the authority but the rest of the path is preserved. If you also need to rewrite the path, combine forwardAction with changeRequestPathAction.
No. Redirects are returned to the client just like any other response. The client decides whether to follow them.