Add frontend/nginx.conf
This commit is contained in:
parent
3cf5a1afbb
commit
47ebf79794
1 changed files with 33 additions and 0 deletions
33
frontend/nginx.conf
Normal file
33
frontend/nginx.conf
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# SPA fallback
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Proxy API to backend
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
# Proxy WebSocket to backend
|
||||
location /ws {
|
||||
proxy_pass http://backend:8000/ws;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
# Proxy HLS segments to backend
|
||||
location /hls/ {
|
||||
proxy_pass http://backend:8000/hls/;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue