From 5f18d277c811455de1db591505d56a02d55c43ac Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Tue, 12 Aug 2025 09:53:15 +0800 Subject: [PATCH] fix(conf): ProxyHeader should be optional (#2760) --- application/migrator/conf/conf.go | 4 ++-- pkg/conf/types.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/migrator/conf/conf.go b/application/migrator/conf/conf.go index e34fc30..45d059d 100644 --- a/application/migrator/conf/conf.go +++ b/application/migrator/conf/conf.go @@ -27,8 +27,8 @@ type system struct { Debug bool SessionSecret string HashIDSalt string - GracePeriod int `validate:"gte=0"` - ProxyHeader string `validate:"required_with=Listen"` + GracePeriod int `validate:"gte=0"` + ProxyHeader string } type ssl struct { diff --git a/pkg/conf/types.go b/pkg/conf/types.go index 509ceca..bdf6f80 100644 --- a/pkg/conf/types.go +++ b/pkg/conf/types.go @@ -46,7 +46,7 @@ type System struct { SessionSecret string HashIDSalt string // deprecated GracePeriod int `validate:"gte=0"` - ProxyHeader string `validate:"required_with=Listen"` + ProxyHeader string LogLevel string `validate:"oneof=debug info warning error"` }