用户使用反向代理访问系统时主动引导用户设置“自定义客户端IP报头“

This commit is contained in:
刘祥超
2024-04-08 11:07:51 +08:00
parent 33a5c86beb
commit 3fa1cf5a2c
8 changed files with 59 additions and 3 deletions

View File

@@ -29,6 +29,11 @@ func init() {
})
}
// DisableXFFPrompt 停用XFF提示
func DisableXFFPrompt() {
securityXFFPromptDisabled = true
}
// 检查用户IP并支持缓存
func checkIP(config *systemconfigs.SecurityConfig, ipAddr string) bool {
ipCacheLocker.Lock()