Set proper scheme in X-Forwarded-Proto for OpenMapKit

This commit is contained in:
Disassembler 2017-12-19 22:16:13 +01:00
parent 6d801b8d8a
commit 56794033e0
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ cp ${SOURCE_DIR}/etc/init.d/openmapkit /etc/init.d/openmapkit
rc-update add openmapkit boot rc-update add openmapkit boot
service openmapkit start service openmapkit start
# Create nginx site definition # Create nginx app definition
cp ${SOURCE_DIR}/etc/nginx/apps/openmapkit /etc/nginx/apps/openmapkit cp ${SOURCE_DIR}/etc/nginx/apps/openmapkit /etc/nginx/apps/openmapkit
cp ${SOURCE_DIR}/etc/nginx/conf.d/openmapkit.conf /etc/nginx/conf.d/openmapkit.conf cp ${SOURCE_DIR}/etc/nginx/conf.d/openmapkit.conf /etc/nginx/conf.d/openmapkit.conf

View File

@ -4,6 +4,6 @@ error_log /var/log/nginx/openmapkit.error.log;
location / { location / {
proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://127.0.0.1:9007; proxy_pass http://127.0.0.1:9007;
} }