Skip to content

Commit 2d6e618

Browse files
committed
Nginx 'Contradictory scheme headers' fix; refs #275
1 parent 40c1853 commit 2d6e618

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

apprise_api/etc/nginx.conf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ http {
2828
access_log /dev/stdout;
2929
error_log /dev/stdout info;
3030

31-
# Centralize configuration so docker containers can easily make use
32-
# of tmpfs mounted to /tmp
31+
# Centralize configuration so docker containers can easily make use
32+
# of tmpfs mounted to /tmp
3333
client_body_temp_path /tmp/nginx_client_temp 1 2;
3434
proxy_temp_path /tmp/nginx_proxy_temp 1 2;
3535
fastcgi_temp_path /tmp/nginx_fastcgi_temp 1 2;
@@ -72,7 +72,8 @@ http {
7272

7373
proxy_set_header Host $host;
7474
proxy_set_header X-Forwarded-Host $host;
75-
proxy_set_header X-Forwarded-Proto $scheme;
75+
# See https://github.com/caronc/apprise-api/issues/275
76+
# Avoid - proxy_set_header X-Forwarded-Proto $scheme;
7677
proxy_set_header X-Real-IP $remote_addr;
7778
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
7879

@@ -92,7 +93,8 @@ http {
9293

9394
proxy_set_header Host $host;
9495
proxy_set_header X-Forwarded-Host $host;
95-
proxy_set_header X-Forwarded-Proto $scheme;
96+
# See https://github.com/caronc/apprise-api/issues/275
97+
# Avoid - proxy_set_header X-Forwarded-Proto $scheme;
9698
proxy_set_header X-Real-IP $remote_addr;
9799
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
98100
proxy_set_header Expect $http_expect;
@@ -106,7 +108,7 @@ http {
106108

107109
# handling of status (/status or /status/)
108110
location ~ ^/status/?$ {
109-
# normalise internally to /status/ (no client redirect)
111+
# normalise internally to /status/ (no client redirect)
110112
rewrite ^/status/?$ /status/ break;
111113

112114
proxy_pass http://apprise_upstream;
@@ -117,7 +119,8 @@ http {
117119

118120
proxy_set_header Host $host;
119121
proxy_set_header X-Forwarded-Host $host;
120-
proxy_set_header X-Forwarded-Proto $scheme;
122+
# See https://github.com/caronc/apprise-api/issues/275
123+
# Avoid - proxy_set_header X-Forwarded-Proto $scheme;
121124
proxy_set_header X-Real-IP $remote_addr;
122125
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
123126

0 commit comments

Comments
 (0)