CORSair
is a lightweight, configurable HTTP proxy that provides flexible request forwarding capabilities. It's designed primarily as a CORS proxy.
CORSair
dynamically exposes endpoints based on a yaml configuration file.
Configuring an endpoint look like this:
- path: /example
remote_url: https://any.url/anything/
headers:
- X-Hello: "{{ WORLD }}" # Double braced expression are used for environment variable substitution.
query_params:
- foo: "bar"
Here, a query to http://<your-corsair-url>/example
will be forwarded to https://any.url.com/anything/?foo=bar
with configured headers. The global CORS header are added to the response (if configured).
See the configuration reference for all options.
It's also possible to use /forward
endpoint to forward a request without any configuration, settings the remote url as query parameter: http://localhost:8080/forward?url=https://any.url.com/anything/
Caution
Forward Endpoint Risk: The /forward?url=
endpoint can potentially access internal networks. Consider disabling it (forward_endpoint_enabled: false
) if you don't need it