reverse proxy - Preserve response headers in nginx -


i have reverse-proxy setup(i think), gunicorn running falcon app. able setup ssl on nginx server. /etc/nginx/nginx.conf:

worker_processes 1;  user nobody nogroup; pid /tmp/nginx.pid; error_log /tmp/nginx.error.log;  events {   worker_connections 1024; # increase if have lots of clients   accept_mutex off; # set 'on' if nginx worker_processes > 1 }  http {   include mime.types;   # fallback in case can't determine type   default_type application/json;   access_log /tmp/nginx.access.log combined;   sendfile on;   gzip              on;   gzip_http_version 1.0;   gzip_proxied      any;   gzip_min_length   500;   gzip_disable      "msie [1-6]\.";   gzip_types        application/json;    upstream app_server {     # fail_timeout=0 means retry upstream if failed     # return http response     server 127.0.0.1:6789 fail_timeout=0;   }    server {     # if no host match, close connection prevent host spoofing     listen 80 default_server;     return 444;   }    server {     listen 443 ssl;     client_max_body_size 4g;      # set correct host(s) site     server_name 0.0.0.0;     ssl_certificate /etc/nginx/ssl/nginx.crt;     ssl_certificate_key /etc/nginx/ssl/nginx.key;      keepalive_timeout 2;      location / {       proxy_bind $server_addr;       proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;       proxy_set_header x-forwarded-proto https;       proxy_set_header host $http_host;       proxy_set_header   x-real-ip $remote_addr;       proxy_set_header   x-forwarded-host $server_name;       proxy_redirect off;       proxy_pass http://app_server;     }   } } 

what need change response headers gunicorn preserved? also, new this. there should change?


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -