-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf.template
More file actions
43 lines (36 loc) · 1.47 KB
/
nginx.conf.template
File metadata and controls
43 lines (36 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
server {
listen 80;
server_name _;
# Statisches Qt-WASM-UI
root /usr/share/nginx/html;
index grin-node-docker.html;
# Qt+WASM (optional für Multi-Thread später sinnvoll)
add_header Cross-Origin-Opener-Policy same-origin always;
add_header Cross-Origin-Embedder-Policy require-corp always;
add_header Cross-Origin-Resource-Policy same-origin always;
# Korrektes MIME-Type für WASM
location ~ \.wasm$ {
types { application/wasm wasm; }
try_files $uri =404;
}
# -----------------------------------------------------------------
# API-Proxy: Browser → /api/... → Controller-Container (konfigurierbar)
# -----------------------------------------------------------------
location /api/ {
proxy_pass http://${CONTROLLER_PROXY}/;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 $scheme;
# optional: Websocket/Keep-Alive, falls du später sowas brauchst
proxy_set_header Connection "";
proxy_buffering off;
}
# -----------------------------------------------------------------
# SPA-Fallback: alles andere auf deine Qt-HTML
# -----------------------------------------------------------------
location / {
try_files $uri /grin-node-docker.html;
}
}