build:#9 reorder paths and update uri

This commit is contained in:
Elmar Kresse
2024-05-28 17:05:44 +02:00
parent b78c1a5063
commit 85d9503c3d

View File

@ -116,7 +116,7 @@ http {
server_name pwa.htwkalender.de; server_name pwa.htwkalender.de;
location / { location / {
return 301 https://pwa.htwkalender.de$request_uri; return 301 https://$host$request_uri;
} }
} }
@ -128,6 +128,16 @@ http {
ssl_certificate htwkalender.de.pem; ssl_certificate htwkalender.de.pem;
ssl_certificate_key htwkalender.de.key.pem; ssl_certificate_key htwkalender.de.key.pem;
location /_ {
proxy_pass http://htwkalender-backend:8090;
# if user is not 0 in admin list, return 404
if ($admin) {
return 404 "Not Found";
}
# Increase upload file size
client_max_body_size 100m;
}
location /api { location /api {
proxy_pass http://htwkalender-backend:8090; proxy_pass http://htwkalender-backend:8090;
client_max_body_size 20m; client_max_body_size 20m;
@ -232,16 +242,6 @@ http {
send_timeout 600s; send_timeout 600s;
} }
location /_ {
proxy_pass http://htwkalender-backend:8090;
# if user is not 0 in admin list, return 404
if ($admin) {
return 404 "Not Found";
}
# Increase upload file size
client_max_body_size 100m;
}
location / { location / {
proxy_pass http://htwkalender-frontend:8000; proxy_pass http://htwkalender-frontend:8000;
} }