From b0a05e1fa9d21da3319e2e1527fd39d6f4952fd1 Mon Sep 17 00:00:00 2001 From: Tom Bursch Date: Tue, 29 Aug 2023 20:01:06 +0200 Subject: [PATCH] fix: nginx default.conf --- default.conf.template | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/default.conf.template b/default.conf.template index 6aa467a5..e708b8d1 100644 --- a/default.conf.template +++ b/default.conf.template @@ -9,7 +9,10 @@ server { location / { client_max_body_size 32M; - try_files $uri $uri/ =404; + try_files $uri $uri/ @redirect; + } + location @redirect { + return 301 "/#/404"; } location /api/ { include uwsgi_params; @@ -22,9 +25,17 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; + proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; uwsgi_buffering off; uwsgi_pass ${BACK_URL}; } +} +server { + listen 9100; + location /metrics/ { + include uwsgi_params; + uwsgi_pass ${BACK_URL}; + } } \ No newline at end of file