feat: properly return 404 when the file does not exist (#966)

Co-authored-by: Nick Douma <n.douma@nekoconeko.nl>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/966
Reviewed-by: konrad <k@knt.li>
Co-authored-by: LordGaav <n.douma+kolaente@nekoconeko.nl>
Co-committed-by: LordGaav <n.douma+kolaente@nekoconeko.nl>
This commit is contained in:
LordGaav 2021-11-10 21:38:07 +00:00 committed by konrad
parent e49fd16a3a
commit 052cd36085

View file

@ -69,10 +69,15 @@ http {
ssl_certificate /etc/nginx/ssl/dummy.crt;
ssl_certificate_key /etc/nginx/ssl/dummy.key;
location ~* .(txt|webmanifest|css|js|mjs|map|svg|jpg|jpeg|png|ico|ttf|woff|woff2|wav)$ {
root /usr/share/nginx/html;
try_files $uri $uri/ =404;
}
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /;
index index.html index.htm;
try_files $uri $uri/ /index.html;
index index.html;
}
error_page 500 502 503 504 /50x.html;