tag(修复):修复跨域错误
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user