Files
web_huangguo_web/app/router/client_headers.go
T
fish03andClaude Opus 5.5 bef9f8b4ed Initial commit
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 14:43:16 +07:00

17 lines
392 B
Go

package router
import (
"videoweb/pub/common/useragent"
"github.com/gin-gonic/gin"
)
// applyClientForwardHeaders 向上游透传客户端 IP / UA(与 API 上游一致):
// X-Real-IP、User-Agent、X-User-Agent。
func applyClientForwardHeaders(header map[string]string, c *gin.Context) {
if header == nil {
return
}
useragent.ApplyToHeader(header, c, useragent.DefaultVer)
}