From 3aab4827fe33922f9515149c5a4910edd6235fcd Mon Sep 17 00:00:00 2001 From: Wancat Date: Wed, 16 Nov 2022 02:34:26 +0800 Subject: [PATCH] Move htpasswd to data dir --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index fdaddb9..2b7ff7d 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "encoding/base64" "flag" "log" + "path" "text/template" "github.com/gorilla/securecookie" @@ -41,7 +42,7 @@ func init() { panic(err) } } - store, err = auth.New(HTPASSWD_FILE, hashKey) + store, err = auth.New(path.Join(DATA_DIR, HTPASSWD_FILE), hashKey) if err != nil { panic(err) }