fix(nginx): adjust config to correctly route /openapi.json and /api/*

This commit is contained in:
Thomas Ritaine
2024-02-27 11:33:48 +01:00
committed by Chris Weaver
parent 9308ba02a1
commit 86215238fc
3 changed files with 9 additions and 3 deletions

View File

@@ -20,7 +20,9 @@ server {
client_max_body_size 5G; # Maximum upload size client_max_body_size 5G; # Maximum upload size
location ~ ^/api(.*)$ { # Match both /api/* and /openapi.json in a single rule
location ~ ^/(api|openapi.json)(/.*)?$ {
# Rewrite /api prefixed matched paths
rewrite ^/api(/.*)$ $1 break; rewrite ^/api(/.*)$ $1 break;
# misc headers # misc headers

View File

@@ -20,7 +20,9 @@ server {
client_max_body_size 5G; # Maximum upload size client_max_body_size 5G; # Maximum upload size
location ~ ^/api(.*)$ { # Match both /api/* and /openapi.json in a single rule
location ~ ^/(api|openapi.json)(/.*)?$ {
# Rewrite /api prefixed matched paths
rewrite ^/api(/.*)$ $1 break; rewrite ^/api(/.*)$ $1 break;
# misc headers # misc headers

View File

@@ -20,7 +20,9 @@ server {
client_max_body_size 5G; # Maximum upload size client_max_body_size 5G; # Maximum upload size
location ~ ^/api(.*)$ { # Match both /api/* and /openapi.json in a single rule
location ~ ^/(api|openapi.json)(/.*)?$ {
# Rewrite /api prefixed matched paths
rewrite ^/api(/.*)$ $1 break; rewrite ^/api(/.*)$ $1 break;
# misc headers # misc headers