Set the environment variable PROXY_ADDRESS to 0.0.0.0:8080 (the default) or your choice to configure the port the proxy listens on.
docker run --rm -it --name my-proxy -e PROXY_ADDRESS=:8080 -c config.yaml:/app/config.yaml reflexi/proxy:latest
The following config will setup a route for /test which will redirect to httpbin.org. You can then curl localhost:8080/test/get to see the response which is proxied.
routes:
- path: "/test"
target: "https://httpbin.org/"
method: "GET"
headers:
remove:
- cookie
- authorization
set:
foo: bar
query:
set:
a: b
auth:
# header:
# key: foo
# value: bar
# request:
# url: https://some.other.url
# method: GET
# code: 200
# headers:
# pass:
# - "Baz"
# set:
# "Foo": "bar"
Content type
Image
Digest
sha256:b3dc20b31…
Size
66 MB
Last updated
over 3 years ago
docker pull reflexi/proxy