🐛 Fix cannot get ip behind cloudflare
This commit is contained in:
parent
283a646eb4
commit
9a2192aa43
@ -29,6 +29,7 @@ func InitServer() *fiber.App {
|
||||
ErrorHandler: status.StatusPageHandler,
|
||||
JSONDecoder: jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal,
|
||||
JSONEncoder: jsoniter.ConfigCompatibleWithStandardLibrary.Marshal,
|
||||
ProxyHeader: fiber.HeaderXForwardedFor,
|
||||
Prefork: viper.GetBool("performance.prefork"),
|
||||
BodyLimit: viper.GetInt("hypertext.limitation.max_body_size"),
|
||||
})
|
||||
|
@ -23,6 +23,7 @@ func InitSideload() *fiber.App {
|
||||
EnableIPValidation: true,
|
||||
JSONDecoder: jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal,
|
||||
JSONEncoder: jsoniter.ConfigCompatibleWithStandardLibrary.Marshal,
|
||||
ProxyHeader: fiber.HeaderXForwardedFor,
|
||||
EnablePrintRoutes: viper.GetBool("debug.print_routes"),
|
||||
TrustedProxies: viper.GetStringSlice("security.sideload_trusted_proxies"),
|
||||
BodyLimit: viper.GetInt("hypertext.limitation.max_body_size"),
|
||||
|
Loading…
Reference in New Issue
Block a user