|
@@ -3,7 +3,6 @@ server {
|
|
|
server_name ai.api.daoguyujia.com;
|
|
|
|
|
|
location / {
|
|
|
-
|
|
|
# # 允许跨域
|
|
|
# add_header Access-Control-Allow-Origin * always;
|
|
|
# add_header Access-Control-Allow-Headers * always;
|
|
@@ -21,8 +20,19 @@ server {
|
|
|
# proxy_set_header Host $proxy_host;
|
|
|
# proxy_set_header X-Real-IP $remote_addr;
|
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ }
|
|
|
|
|
|
+ location /sqx_fast/sse/stream {
|
|
|
+ proxy_pass http://127.0.0.1:48080/api/log/stream/watch;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Upgrade $http_upgrade;
|
|
|
+ proxy_set_header Connection "upgrade";
|
|
|
+ # 以下设置确保SSE正常工作
|
|
|
+ proxy_buffering off; # 关闭缓冲,确保数据实时发送
|
|
|
+ proxy_cache off; # 关闭代理缓存
|
|
|
+ proxy_set_header Connection ""; # 清除原有的Connection头,避免影响
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
# server {
|
|
@@ -53,4 +63,15 @@ server {
|
|
|
# proxy_redirect off;
|
|
|
# }
|
|
|
|
|
|
+# location /sqx_fast/sse/stream {
|
|
|
+# proxy_pass http://127.0.0.1:48080/api/log/stream/watch;
|
|
|
+# proxy_http_version 1.1;
|
|
|
+# proxy_set_header Upgrade $http_upgrade;
|
|
|
+# proxy_set_header Connection "upgrade";
|
|
|
+# # 以下设置确保SSE正常工作
|
|
|
+# proxy_buffering off; # 关闭缓冲,确保数据实时发送
|
|
|
+# proxy_cache off; # 关闭代理缓存
|
|
|
+# proxy_set_header Connection ""; # 清除原有的Connection头,避免影响
|
|
|
+# }
|
|
|
+
|
|
|
# }
|