Fix jwt-token

This commit is contained in:
2025-09-06 16:15:59 +02:00
parent 4287a63b8d
commit ad08729521
4 changed files with 28 additions and 14 deletions

View File

@@ -25,9 +25,10 @@ server {
application/xml+rss
application/json;
# Handle React Router (SPA)
location / {
try_files $uri $uri/ /index.html;
# Handle React Router (SPA) - serve from /uggla/ path
location /uggla/ {
alias /usr/share/nginx/html/;
try_files $uri $uri/ /uggla/index.html;
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
@@ -36,9 +37,14 @@ server {
}
}
# Root redirect to uggla
location = / {
return 301 /uggla/;
}
# Proxy API requests to backend
location /api {
proxy_pass http://backend:3001;
location /uggla/api/ {
proxy_pass http://backend:3001/api/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
@@ -51,8 +57,8 @@ server {
}
# WebSocket proxy for Socket.IO
location /socket.io/ {
proxy_pass http://backend:3001;
location /uggla/socket.io/ {
proxy_pass http://backend:3001/socket.io/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";