fix(reverse-proxy): 🐛 disable forwarding requests to archival-api (it's getting requests for directory)

This commit is contained in:
Collin M. Barrett 2020-09-23 09:05:02 -05:00
parent 5ff5750127
commit 104183346a
2 changed files with 22 additions and 22 deletions

View file

@ -1,17 +1,17 @@
server {
listen 80 default_server;
location ^~ /api/archival/ {
rewrite ^/api/archival/(.*)$ /$1 break;
proxy_pass http://archival-api:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# location ^~ /api/archival/ {
# rewrite ^/api/archival/(.*)$ /$1 break;
# proxy_pass http://archival-api:80;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection keep-alive;
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# }
location ^~ /api/ {
rewrite ^/api/(.*)$ /$1 break;

View file

@ -9,17 +9,17 @@ server {
add_header Content-Security-Policy "default-src 'none'; connect-src 'self'; img-src 'self' data:; manifest-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; base-uri 'none'; form-action 'none'; frame-ancestors 'none';" always;
location ^~ /api/archival/ {
rewrite ^/api/archival/(.*)$ /$1 break;
proxy_pass http://archival-api:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# location ^~ /api/archival/ {
# rewrite ^/api/archival/(.*)$ /$1 break;
# proxy_pass http://archival-api:80;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection keep-alive;
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# }
location ^~ /api/ {
rewrite ^/api/(.*)$ /$1 break;