Skip to content

Commit 15fae53

Browse files
Kevinjilnickygerritsen
authored andcommitted
Set HTTPS fastcgi param correctly for http
Traefik also sets the 'X-Forwarded-Proto' header with regular HTTP traffic. As the 'HTTP' value is not empty, the 'HTTPS' fastcgi parameter was set and requests were incorrectly upgraded to 'HTTPS'.
1 parent d2e05d3 commit 15fae53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

etc/nginx-conf-inner.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ location @domjudgeFront {
4949
fastcgi_param SCRIPT_NAME $prefix/index.php;
5050
fastcgi_param REQUEST_URI $prefix$uri?$args;
5151
fastcgi_param DOCUMENT_ROOT $domjudgeRoot;
52-
fastcgi_param HTTPS $http_x_forwarded_proto if_not_empty;
52+
fastcgi_param HTTPS $fastcgi_param_https_variable;
5353
# Prevents URIs that include the front controller. This will 404:
5454
# http://domain.tld/app_dev.php/some-path
5555
internal;
@@ -64,7 +64,7 @@ location @domjudgeFrontApi {
6464
fastcgi_param SCRIPT_NAME $prefix/index.php;
6565
fastcgi_param REQUEST_URI $prefix$uri?$args;
6666
fastcgi_param DOCUMENT_ROOT $domjudgeRoot;
67-
fastcgi_param HTTPS $http_x_forwarded_proto if_not_empty;
67+
fastcgi_param HTTPS $fastcgi_param_https_variable;
6868
# Prevents URIs that include the front controller. This will 404:
6969
# http://domain.tld/app_dev.php/some-path
7070
internal;

0 commit comments

Comments
 (0)