keep original proto header if exists
This commit is contained in:
parent
4444367d67
commit
c7a281c78e
|
@ -44,9 +44,16 @@ http {
|
||||||
gzip_http_version 1.1;
|
gzip_http_version 1.1;
|
||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
|
# if x-forwarded-proto header is set to https keep the header
|
||||||
|
map $http_x_forwarded_proto $real_proto {
|
||||||
|
default "http";
|
||||||
|
"https" "https";
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 4848;
|
listen 4848;
|
||||||
listen [::]:4848;
|
listen [::]:4848;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
root /docs;
|
root /docs;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
@ -54,12 +61,10 @@ http {
|
||||||
proxy_buffers 32 4k;
|
proxy_buffers 32 4k;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:8080;
|
proxy_pass http://127.0.0.1:8080;
|
||||||
proxy_set_header Host localhost;
|
proxy_set_header Host localhost;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $real_proto;
|
||||||
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-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|
Loading…
Reference in New Issue