mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
chore: handle trusted proxies config error
This commit is contained in:
@@ -191,7 +191,11 @@ func (app *BootstrapApp) Setup() error {
|
|||||||
engine := gin.New()
|
engine := gin.New()
|
||||||
|
|
||||||
if len(app.config.TrustedProxies) > 0 {
|
if len(app.config.TrustedProxies) > 0 {
|
||||||
engine.SetTrustedProxies(strings.Split(app.config.TrustedProxies, ","))
|
err := engine.SetTrustedProxies(strings.Split(app.config.TrustedProxies, ","))
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("failed to set trusted proxies: %w", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if config.Version != "development" {
|
if config.Version != "development" {
|
||||||
|
|||||||
Reference in New Issue
Block a user