修复工作
This commit is contained in:
@@ -9,9 +9,9 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# 后端API代理
|
||||
# 后端API代理(backend使用host网络)
|
||||
location /prod-api/ {
|
||||
proxy_pass http://rtsp-backend:8080/;
|
||||
proxy_pass http://127.0.0.1:8080/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -23,7 +23,7 @@ server {
|
||||
|
||||
# WebSocket支持(用于视频流)
|
||||
location /websocket/ {
|
||||
proxy_pass http://rtsp-backend:8080/websocket/;
|
||||
proxy_pass http://127.0.0.1:8080/websocket/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
@@ -35,18 +35,18 @@ server {
|
||||
proxy_read_timeout 7d;
|
||||
}
|
||||
|
||||
# Python推理服务代理
|
||||
# Python推理服务代理(映射到宿主机端口)
|
||||
location /python-api/ {
|
||||
proxy_pass http://rtsp-python-service:8000/;
|
||||
proxy_pass http://127.0.0.1:8000/;
|
||||
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;
|
||||
}
|
||||
|
||||
# 视频流代理(HTTP-FLV)
|
||||
# 视频流代理(HTTP-FLV,backend使用host网络)
|
||||
location /live {
|
||||
proxy_pass http://rtsp-backend:8866/live;
|
||||
proxy_pass http://127.0.0.1:8866/live;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -54,11 +54,12 @@ server {
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
chunked_transfer_encoding off;
|
||||
}
|
||||
|
||||
# 视频流代理(HLS)
|
||||
location /hls {
|
||||
proxy_pass http://rtsp-backend:8866/hls;
|
||||
proxy_pass http://127.0.0.1:8866/hls;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user