Permalink
Browse files

add some headers for https reverse proxying and fix some spelling mis…

…takes on the http ones.
  • Loading branch information...
1 parent 4253e36 commit a599b6ee62dc6b8de3aa5b25d37e3f922bbcd81d hmalphettes committed Jul 18, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 dev_setup/cookbooks/nginx/templates/default/ubuntu-nginx.conf.erb
@@ -81,8 +81,8 @@ http {
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
- proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded_Proto http;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto http;
proxy_redirect off;
proxy_connect_timeout <%= node[:nginx][:proxy_connect_timeout] %>;
proxy_send_timeout <%= node[:nginx][:proxy_send_timeout] %>;
@@ -130,7 +130,9 @@ http {
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
- proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto https;
+ proxy_set_header X-Forwarded-Ssl on;
proxy_redirect off;
proxy_connect_timeout <%= node[:nginx][:proxy_connect_timeout] %>;
proxy_send_timeout <%= node[:nginx][:proxy_send_timeout] %>;

0 comments on commit a599b6e

Please sign in to comment.