mirror of
https://github.com/veops/oneterm.git
synced 2025-10-05 15:27:01 +08:00
feat(backend): update swagger
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user