feat: relax tunnel proxy path restriction to allow frontend proxying

This commit is contained in:
duorameng
2026-06-25 21:52:17 +08:00
parent d707bc1be7
commit a3d4f441a3
2 changed files with 3 additions and 13 deletions
+1 -7
View File
@@ -28,14 +28,8 @@ func TravelProxyMiddleware() gin.HandlerFunc {
return
}
path := c.Request.URL.Path
// 1.5 只拦截 API 请求,静态资源文件等必须从主节点本地加载
if !strings.HasPrefix(path, "/api/v1/") {
c.Next()
return
}
// 2. 白名单放行:反向隧道建立连接端点必须直达本机,不能二次代理
path := c.Request.URL.Path
if strings.HasPrefix(path, "/api/v1/interconnect/tunnel") {
c.Next()
return