@@ -3,15 +3,13 @@ server {
33 server_name ${NGINX_HOST};
44
55 location / {
6- proxy_pass http://payload:3000;
7-
86 add_header X-Cache $upstream_cache_status;
97
108 proxy_http_version 1.1;
119 proxy_set_header Upgrade $http_upgrade;
1210 proxy_set_header Connection "upgrade";
1311 proxy_set_header Host $host;
14- proxy_set_header X-Forwarded-For $host ;
12+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
1513 proxy_set_header X-Forwarded-Proto $scheme;
1614 proxy_set_header X-Forwarded-Host $host;
1715
@@ -24,14 +22,32 @@ server {
2422 proxy_cache_valid any 1m;
2523 proxy_cache_revalidate on;
2624 proxy_cache_use_stale error timeout updating;
25+
26+ proxy_pass http://payload:3000;
2727 }
2828
2929 # Doing this in both ways to avoid a redirect loop
3030 location /admin {
31+ proxy_http_version 1.1;
32+ proxy_set_header Upgrade $http_upgrade;
33+ proxy_set_header Connection "upgrade";
34+ proxy_set_header Host $host;
35+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
36+ proxy_set_header X-Forwarded-Proto $scheme;
37+ proxy_set_header X-Forwarded-Host $host;
38+
3139 proxy_pass http://payload:3000/admin;
3240 }
3341
3442 location /admin/ {
43+ proxy_http_version 1.1;
44+ proxy_set_header Upgrade $http_upgrade;
45+ proxy_set_header Connection "upgrade";
46+ proxy_set_header Host $host;
47+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
48+ proxy_set_header X-Forwarded-Proto $scheme;
49+ proxy_set_header X-Forwarded-Host $host;
50+
3551 proxy_pass http://payload:3000/admin/;
3652 }
3753}
0 commit comments