[IMP]Use official recommendation for nginx proxy headers
This commit is contained in:
parent
3658302e37
commit
1f0b22509c
@ -20,24 +20,19 @@ server {
|
||||
gzip_min_length 256;
|
||||
gzip_types text/plain application/x-javascript application/json text/xml text/css;
|
||||
gzip_vary on;
|
||||
location / {
|
||||
proxy_pass http://${ODOO_SERVICE}server;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 300;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 720s;
|
||||
proxy_connect_timeout 720s;
|
||||
proxy_send_timeout 720s;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}host;
|
||||
proxy_set_header X-Forwarded-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto ${DOLLSIGN}scheme;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
location / {
|
||||
proxy_pass http://${ODOO_SERVICE}server;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /longpolling {
|
||||
proxy_pass http://${ODOO_SERVICE}longpoll;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
@ -10,22 +10,19 @@ server {
|
||||
listen ${PORT};
|
||||
server_name ${ODOO_SERVER_NAMES};
|
||||
client_max_body_size 200M;
|
||||
location / {
|
||||
proxy_pass http://odooserver;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 300;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect http://$http_host/ https://$host:$server_port/;
|
||||
proxy_read_timeout 720s;
|
||||
proxy_connect_timeout 720s;
|
||||
proxy_send_timeout 720s;
|
||||
proxy_set_header Host ${DOLLSIGN}host;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}host;
|
||||
proxy_set_header X-Forwarded-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto ${DOLLSIGN}scheme;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
location / {
|
||||
proxy_pass http://odooserver;
|
||||
proxy_redirect off;
|
||||
}
|
||||
location /longpolling {
|
||||
proxy_pass http://odoolongpoll;
|
||||
proxy_set_header Host ${DOLLSIGN}http_host;
|
||||
proxy_set_header X-Real-IP ${DOLLSIGN}remote_addr;
|
||||
proxy_set_header X-Forward-For ${DOLLSIGN}proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host ${DOLLSIGN}http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user