server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; # 1. Deine statischen Hugo-Dateien location / { try_files $uri $uri/ =404; } # 2. Der API-Proxy (für den Button-Klick) location /api/ { proxy_pass http://open-webui:8080/api/; proxy_set_header Host $host; proxy_set_header Authorization "Bearer ${TOKEN}"; } # 3. Der Chat-Proxy (für das Iframe) location /c/ { proxy_pass http://open-webui:8080/c/; proxy_set_header Host $host; proxy_set_header Authorization "Bearer ${TOKEN}"; # Wichtig, damit das Iframe nicht blockiert wird proxy_hide_header X-Frame-Options; proxy_hide_header Content-Security-Policy; } # 4. DIE NEUEN PFADE (Damit das Design/Layout lädt) location /_app/ { proxy_pass http://open-webui:8080/_app/; proxy_set_header Host $host; } location /assets/ { proxy_pass http://open-webui:8080/assets/; proxy_set_header Host $host; } location /static/ { proxy_pass http://open-webui:8080/static/; proxy_set_header Host $host; } }