mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-27 20:25:41 +00:00
feat: add trusted proxies config value
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user