feat: add trusted proxies config value

This commit is contained in:
Stavros
2025-09-03 12:14:04 +03:00
parent f3eb7f69b4
commit 773cd6d171
3 changed files with 3 additions and 0 deletions

View File

@@ -146,6 +146,7 @@ func (app *BootstrapApp) Setup() error {
// Create engine
engine := gin.New()
engine.SetTrustedProxies(strings.Split(app.Config.TrustedProxies, ","))
if config.Version != "development" {
gin.SetMode(gin.ReleaseMode)

View File

@@ -53,6 +53,7 @@ type Config struct {
LdapSearchFilter string `mapstructure:"ldap-search-filter"`
ResourcesDir string `mapstructure:"resources-dir"`
DatabasePath string `mapstructure:"database-path" validate:"required"`
TrustedProxies string `mapstructure:"trusted-proxies"`
}
// OAuth/OIDC config