feat: Füge Wallet-Unterstützung zur Crash-Seite hinzu und verbessere WebSocket-Verbindung

This commit is contained in:
2025-11-23 13:08:00 +01:00
parent 2beb5efdb4
commit 3624fff9d8
2 changed files with 62 additions and 17 deletions
+14 -1
View File
@@ -14,6 +14,18 @@ server {
root /usr/share/nginx/html;
index index.html;
# --- WebSocket-Route ---
# Dieser Block fängt Anfragen an /ws ab und leitet sie mit den
# nötigen Headern für eine WebSocket-Verbindung weiter.
location /ws {
proxy_pass http://bierbaron_backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
# --- API-Routen (HTTP) ---
location ~ ^/(api|auth|me|wallet|slot|admin|health)($|/) {
proxy_pass http://bierbaron_backend;
proxy_http_version 1.1;
@@ -25,14 +37,15 @@ server {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header Cookie $http_cookie;
}
# --- Statisches Frontend (Single Page Application) ---
location / {
try_files $uri /index.html;
}
# Optionale Caching-Regeln für statische Assets
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|webp|woff|woff2|ttf)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable";