This commit is contained in:
2025-11-19 19:08:21 +01:00
parent 8e18f2ce76
commit b314a683c9
3 changed files with 14 additions and 3 deletions

View File

@@ -30,6 +30,14 @@ func run(updateChan <-chan struct{}) {
slog.SetLogLoggerLevel(slog.LevelDebug)
}
if !filepath.IsAbs(documentRoot) {
if v, err := filepath.Abs(documentRoot); err == nil {
documentRoot = v
} else {
fatal("failed to get absolute path from document-root flag: "+err.Error(), 2)
}
}
slog.Info("loading .htpasswd")
h, err := htpasswd.Open(filepath.Join(documentRoot, ".htpasswd"))
if err != nil {