mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
Fix Set correct forward proto even when behind reverse proxy
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
# by using `envsubst` to replace the environment variables in the template with
|
||||
# their actual values.
|
||||
|
||||
# Helper to get scheme regardless if we are behind a prox or not
|
||||
map $http_x_forwarded_proto $forwardscheme {
|
||||
default $scheme;
|
||||
https https;
|
||||
}
|
||||
|
||||
server {
|
||||
root /var/www/html;
|
||||
listen ${ROMM_PORT};
|
||||
@@ -10,7 +16,8 @@ server {
|
||||
proxy_set_header Host $http_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 $scheme;
|
||||
proxy_set_header X-Forwarded-Proto $forwardscheme;
|
||||
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
Reference in New Issue
Block a user