-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support setting request headers for reverse-proxy command #5376
Comments
At that point, I'd argue you're better off using a Caddyfile and using |
In my case, the one-line command is for temporary use in a safe environment. |
The problem is |
Another method is to add a command line option. I am using docker run --rm -p 10000:10000 library/caddy sh -c 'echo -e ":10000 {\n reverse_proxy :20000 {\n header_up Authorization \"Basic base64_encoded\"\n }\n}" | caddy run --adapter caddyfile --config -' But this requires some extra effort to encode the credentials. |
I'm also inclined to suggest a config file is the best answer here; but would a command line flag to set upgoing headers work for you? |
I'd say a |
An option to set headers sounds good to me. |
|
This will sorta depend on the work from #5379 otherwise we'd waste a bit of time setting up the type to accept multiple header values. With the cobra changes, we can just use |
The one-line reverse-proxy command could be even better if it supports basic authentication like this:
The text was updated successfully, but these errors were encountered: