Forward the Protocol from Nginx to Rails
Using Passenger and Nginx and want to run HTTP and HTTPS in parallel?
If you're not proxying, set the following to forward your scheme on to rails. From there, RackSSL or RackSSLEnforcer will know the request is SSL or not.
passenger_set_cgi_param HTTP_X_FORWARDED_PROTO $scheme;
Written by Brian Ryckbost
Related protips
1 Response
proxy_set_header X-Forwarded-Proto $scheme
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#