Skip to content

Commit

Permalink
fixed issue with basic auth per #617
Browse files Browse the repository at this point in the history
  • Loading branch information
galen0624 committed Mar 21, 2019
1 parent 7a578dd commit b3fddb0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions auth/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ func newBasicAuth(cfg config.BasicAuth) (AuthScheme, error) {
log.Println("[WARN] Error processing a line in an htpasswd file:", err)
}

stat, err := os.Stat(cfg.File)
if err != nil {
return nil, err
}
cfg.ModTime = stat.ModTime()

secrets, err := htpasswd.New(cfg.File, htpasswd.DefaultSystems, bad)
if err != nil {
return nil, err
}

if cfg.Refresh > 0 {
stat, err := os.Stat(cfg.File)
if err != nil {
return nil, err
}
cfg.ModTime = stat.ModTime()

go func() {
ticker := time.NewTicker(cfg.Refresh).C
for range ticker {
Expand Down

0 comments on commit b3fddb0

Please sign in to comment.