-
Notifications
You must be signed in to change notification settings - Fork 144
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
question: Is X-Forwarded-Proto set correctly? #92
Comments
Hi, this sounds like what was fix in #83 ? |
I tracked down a bug with X-Forwarded-Proto. When using "--cert" X-Forwarded-Proto gets set to "http" (should be "https") Steps to reproduce:
# start web server in one terminal (netcat will do in a pinch)
nc -l 9000 # start devd in another terminal
# just use ~/.devd.cert which should be there if you have ever started devd with --tls
devd --cert=${HOME}/.devd.cert http://localhost:9000 # Make request
curl -k https://devd.io:8000 Then inspect the output from netcat. ( ctrl+C to quit netcat) Note: the "--tls" flag sets X-Forwarded-Proto correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm invoking
devd
with the command below and accessing my application overhttps://devd.io/
. I noticed in my application thatX-Forwarded-Proto = http
- shouldn't it behttps
since I am forwarding/=https://127.0.0.1:3000/
?Changing the following line in
reverseproxy.go
toreq.Header.Set("X-Forwarded-Proto", target.Scheme)
results inX-Forwarded-Proto
being set tohttps
(it works for my use-case but I'm not sure if this is the right fix?).devd/reverseproxy/reverseproxy.go
Line 80 in 93164c9
The text was updated successfully, but these errors were encountered: