refactor: move disable ui warnings to ui cfg and trusted proxies to auth

cfg
This commit is contained in:
Stavros
2026-02-16 19:18:25 +02:00
parent a576e915b4
commit e078e8a3f0
3 changed files with 26 additions and 26 deletions

View File

@@ -21,8 +21,8 @@ func (app *BootstrapApp) setupRouter() (*gin.Engine, error) {
engine := gin.New()
engine.Use(gin.Recovery())
if len(app.config.Server.TrustedProxies) > 0 {
err := engine.SetTrustedProxies(app.config.Server.TrustedProxies)
if len(app.config.Auth.TrustedProxies) > 0 {
err := engine.SetTrustedProxies(app.config.Auth.TrustedProxies)
if err != nil {
return nil, fmt.Errorf("failed to set trusted proxies: %w", err)
@@ -71,7 +71,7 @@ func (app *BootstrapApp) setupRouter() (*gin.Engine, error) {
ForgotPasswordMessage: app.config.UI.ForgotPasswordMessage,
BackgroundImage: app.config.UI.BackgroundImage,
OAuthAutoRedirect: app.config.OAuth.AutoRedirect,
DisableUIWarnings: app.config.DisableUIWarnings,
DisableUIWarnings: app.config.UI.DisableWarnings,
}, apiRouter)
contextController.SetupRoutes()