add redirects to nginx config

This commit is contained in:
2023-12-03 16:34:48 +01:00
parent af9465c127
commit 9fb78329cc

View File

@@ -18,6 +18,8 @@ server {
sub_filter 'http://${MARBAS_URL}/' '/marbas/';
sub_filter_once off;
sub_filter_types application/json;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /pocketbase/ {
proxy_pass https://${POCKET_BASE_URL}/;
@@ -26,6 +28,8 @@ server {
proxy_ssl_server_name on;
proxy_set_header Host "${POCKET_BASE_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /evepraisal/ {
proxy_pass https://${EVEPRAISAL_URL}/;
@@ -34,14 +38,18 @@ server {
proxy_ssl_server_name on;
proxy_set_header Host "${EVEPRAISAL_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /fuzzwork/ {
location /fuzzwork/ {
proxy_pass https://${FUZZWORK_URL}/;
proxy_http_version 1.1;
rewrite /fuzzwork/(.*) /$1 break;
proxy_ssl_server_name on;
proxy_set_header Host "${FUZZWORK_URL}";
proxy_set_header X-Forwarded-Proto https;
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location /esi/ {
proxy_pass https://esi.evetech.net/;
@@ -51,5 +59,12 @@ server {
proxy_set_header Host "esi.evetech.net";
proxy_set_header X-Forwarded-Proto https;
proxy_set_header User-Agent "${ESI_USER_AGENT}";
proxy_intercept_errors on;
error_page 301 302 307 = @handle_redirects;
}
location @handle_redirects {
set $saved_redirect_location '$upstream_http_location';
proxy_pass $saved_redirect_location;
}
}