fix nginx config
This commit is contained in:
parent
bee69cfbad
commit
589eee5026
1 changed files with 7 additions and 1 deletions
|
@ -38,7 +38,13 @@ http {
|
|||
error_log /var/log/nginx/pterodactyl.app-error.log error;
|
||||
|
||||
# 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;
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue