Skip to content

Commit

Permalink
fix config loading
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrSaber committed Oct 13, 2024
1 parent 1fe1dd9 commit c2dc25a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/models/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (c *Config) Load(yamlBody []byte) error {

for i, r := range c.Redirects {
if r.TempRedirect == nil {
c.Redirects[i].TempRedirect = c.TempRedirect
r.TempRedirect = c.TempRedirect
}

// Add actual auth objects to redirect for simpler authentication
Expand All @@ -134,6 +134,8 @@ func (c *Config) Load(yamlBody []byte) error {
r.ActualAuths.BasicAuth[authName] = c.Auth.BasicAuth[authName]
}
}

c.Redirects[i] = r
}

return nil
Expand Down

0 comments on commit c2dc25a

Please sign in to comment.