Forum Discussion
Jan_V_48538
Nimbostratus
Sep 28, 2009how to set https header?
In our production environment, the client uses ssl for the authorize_new request. Because we are handling ssl on the load balancer, the application does not know that the protocol is https instead of http, so the OAuth signature is not generated correctly.
Does anyone know how we would configure the load balancer to set a header for https requests? Rails expects one of the following headers to be set:
HTTPS: on
HTTP_X_FORWARDED_PROTO: https
Thanks.
Jan
- The_Bhattman
Nimbostratus
Hi Jan,when HTTP_REQUEST{ if { (![HTTP::header "HTTP_X_FORWARDED_PROTO"] equals "https") and (![HTTP::header "HTTPS"] equals "on") } { HTTP::header insert "HTTP_X_FORWARDED_PROTO" "https" HTTP::header insert "HTTPS" "on" } }
- hoolio
Cirrostratus
Also, if you want to do this in the HTTP profile, you could configure the header to erase as one of the header names (HTTPS or HTTP_X_FORWARDED_PROTO) and the same header name in the header to insert field as the header name and value ('HTTPS: on' or 'HTTP_X_FORWARDED_PROTO: https'). - Peter_Milanese_
Nimbostratus
Posted By hoolio on 09/28/2009 1:55 PM
- hoolio
Cirrostratus
Hi Peter,when HTTP::request { Insert multiple headers in one command HTTP::header insert header_1 value_1 header_2 value_2 Insert a third header in a separate command HTTP::header insert header_3 value_3 Remove all headers with this name (only supports one header name per invocation) HTTP::header remove header_1 }
- Peter_Milanese_
Nimbostratus
Thanks much Aaron, that got me a lot closer. - Peter_Milanese_
Nimbostratus
We worked around this on the backend, thanks for the help Aaron! - hoolio
Cirrostratus
The HTTP_ prefix is generated by your web server as part of the CGI spec: - goyogi
Nimbostratus
Hey Peter, what did you do on the backend as your work around?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects