-
Notifications
You must be signed in to change notification settings - Fork 619
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
x-forwarded-proto
is always HTTP when Fabio is behind ELB
#308
Comments
fabio does not touch the https://github.com/fabiolb/fabio/blob/master/proxy/http_headers.go#L48-L64 and the way I read the AWS docs on the ELB and SSL termination the ELB should set it to Based on your comment from #296 I assume that isn't the case. Do you know why? |
Ok, after further investigation it seems that there are no support in ELB for WebSockets so when one connect to ELB and termination happens then there are no |
Hmm, could you try using the port from the RemoteAddr instead? https://github.com/fabiolb/fabio/blob/master/proxy/http_headers.go#L22 and set it here with https://github.com/fabiolb/fabio/blob/master/proxy/http_headers.go#L67 |
@magiconair I am not familiar with Go and Fabio internals, so I am not quite sure what you are saying. |
Ah, ok. I thought you could make a simple patch and rebuild it since I was in a hurry but wanted to give something to you to test. I'll provide a proper patch and instructions. |
Hi, I was looking into the same recently. My understanding is aws ELB does support WebSockets with TCP/SSL being used. It also supports proxy protocol v1 to carry over the original connection information. Fabio however only sets X-Forwarded-For when it's websocket (i.e. header Upgrade is set to "websocket".) And that could potentially break backend services relying on the header but doesn't use websocket. Also, proxy protocol v1 does not seem to keep the protocol of the original request. So there may be no way for fabio to know the protocol used between the client and the elb. Please let me know if it makes sense / if I miss anything. Thanks. |
I have applications hidden behind ELB and Fabio and
x-forwarded-proto
is alwayshttp
even when connecting via HTTPS.ELB configuration is here: https://github.com/appunite/terraform-modules/blob/68c0cd1df550d379141aa4be7e25f30938d2a443/aws/elb/main.tf
And sample headers list is:
The text was updated successfully, but these errors were encountered: