mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-02 21:22:51 +02:00
fix(nginx): adjust config to correctly route /openapi.json and /api/*
This commit is contained in:
committed by
Chris Weaver
parent
9308ba02a1
commit
86215238fc
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user