Migrate project from typing_practiceweb

This commit is contained in:
2026-05-14 16:04:14 +08:00
parent dbc5425706
commit 0e87d5546d
225 changed files with 92811 additions and 0 deletions

39
nginx-path-compat.conf Normal file
View File

@@ -0,0 +1,39 @@
# Nginx路径兼容配置 - 支持 /api/socket.io 和 /socket.io
# 将此配置添加到你的现有Nginx配置中
# 方法1: 使用正则表达式匹配多种socket.io路径
location ~ ^/(api/)?socket\.io/ {
# 统一转发到后端的标准路径
proxy_pass http://localhost:5001/api/socket.io/;
proxy_http_version 1.1;
# WebSocket握手头
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# 其他头
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;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
# 缓冲区设置
proxy_buffering off;
proxy_buffer_size 16k;
proxy_buffers 4 32k;
}
# 方法2: 分别处理两种路径如果方法1不工作
# location = /api/socket.io/ {
# proxy_pass http://localhost:5001/api/socket.io/;
# # ... 其他配置保持不变
# }
#
# location = /socket.io/ {
# proxy_pass http://localhost:5001/api/socket.io/;
# # ... 其他配置保持不变
# }