mirror of
https://github.com/veops/oneterm.git
synced 2025-10-31 02:46:29 +08:00
chore: release v25.8.1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -16,10 +17,18 @@ func LoggerMiddleware() gin.HandlerFunc {
|
||||
ctx.Next()
|
||||
|
||||
cost := time.Since(start)
|
||||
|
||||
// Skip logging for web proxy requests to reduce noise
|
||||
url := ctx.Request.URL.String()
|
||||
host := ctx.Request.Host
|
||||
if strings.HasPrefix(host, "asset-") {
|
||||
return
|
||||
}
|
||||
|
||||
// Only log errors and slow requests
|
||||
status := ctx.Writer.Status()
|
||||
if status >= 400 || cost > 1*time.Second {
|
||||
logger.L().Info(ctx.Request.URL.String(),
|
||||
logger.L().Info(url,
|
||||
zap.String("method", ctx.Request.Method),
|
||||
zap.Int("status", status),
|
||||
zap.String("ip", ctx.ClientIP()),
|
||||
@@ -27,7 +36,7 @@ func LoggerMiddleware() gin.HandlerFunc {
|
||||
)
|
||||
} else {
|
||||
// Normal requests use debug level to reduce log noise
|
||||
logger.L().Debug(ctx.Request.URL.String(),
|
||||
logger.L().Debug(url,
|
||||
zap.String("method", ctx.Request.Method),
|
||||
zap.Int("status", status),
|
||||
zap.String("ip", ctx.ClientIP()),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
oneterm-api:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/veops/oneterm-api:v25.7.1.fix
|
||||
image: registry.cn-hangzhou.aliyuncs.com/veops/oneterm-api:v25.8.1
|
||||
container_name: oneterm-api
|
||||
environment:
|
||||
ONETERM_RDP_DRIVE_PATH: /rdp
|
||||
@@ -95,7 +95,7 @@ services:
|
||||
- redis
|
||||
|
||||
oneterm-ui:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/veops/oneterm-ui:v25.7.1.fix2
|
||||
image: registry.cn-hangzhou.aliyuncs.com/veops/oneterm-ui:v25.8.1
|
||||
container_name: oneterm-ui
|
||||
depends_on:
|
||||
oneterm-api:
|
||||
|
||||
Reference in New Issue
Block a user