feat(backend): update swagger

This commit is contained in:
pycook
2025-05-28 21:42:03 +08:00
parent a1d2b461dc
commit cfe1a98c7d
5 changed files with 555 additions and 35 deletions

View File

@@ -23,7 +23,10 @@ func (w bodyWriter) Write(b []byte) (int, error) {
func Error2RespMiddleware() gin.HandlerFunc {
return func(ctx *gin.Context) {
if strings.Contains(ctx.Request.URL.String(), "session/replay") {
// Skip middleware for session replay and file download endpoints
urlPath := ctx.Request.URL.String()
if strings.Contains(urlPath, "session/replay") ||
strings.Contains(urlPath, "/file/download/") {
ctx.Next()
return
}