1
0
Fork 0

fix nginx config

This commit is contained in:
saibotk 2019-07-29 03:16:06 +02:00
parent bee69cfbad
commit 589eee5026

View file

@ -38,7 +38,13 @@ http {
error_log /var/log/nginx/pterodactyl.app-error.log error; error_log /var/log/nginx/pterodactyl.app-error.log error;
# Redirect to https # Redirect to https
if ($http_x_forwarded_proto != false && $http_x_forwarded_proto != "https") { if ($http_x_forwarded_proto != "https") {
set $shouldRedirectToHTTPS 1;
}
if ($http_x_forwarded_proto == false) {
set $shouldRedirectToHTTPS 0;
}
if ($shouldRedirectToHTTPS = 1) {
return 301 https://$host$request_uri; return 301 https://$host$request_uri;
} }