tag(修复):修复跨域错误

This commit is contained in:
OrangeRoll
2026-08-11 16:37:53 +08:00
parent 0f82920df0
commit b04c0ad43e
13 changed files with 202 additions and 104 deletions
+6 -21
View File
@@ -1,4 +1,5 @@
# Put the map block in nginx.conf's http {} section, only once.
# External Nginx configuration. Put the map block in nginx.conf's http {}
# section only once. Replace 10.0.0.20 with the application server's private IP.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
@@ -19,30 +20,14 @@ server {
ssl_certificate_key /etc/letsencrypt/live/share.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:5173;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /api/ {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /rtc/ {
proxy_pass http://127.0.0.1:7880;
# This one upstream handles the frontend, API, and LiveKit signalling.
proxy_pass http://10.0.0.20:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 3600s;
}
location /twirp/ {
proxy_pass http://127.0.0.1:7880;
proxy_set_header Host $host;
}
}