enable auth by default with temporary random JWT

This commit is contained in:
yusing
2025-02-18 02:27:45 +08:00
parent ee27237083
commit 651a7cf83e
3 changed files with 15 additions and 3 deletions

View File

@@ -82,7 +82,11 @@ func main() {
homepage.InitOverridesConfig,
favicon.InitIconCache,
)
// logging.AddHook(notif.GetDispatcher())
if common.APIJWTSecret == nil {
logging.Warn().Msg("API_JWT_SECRET is not set, using random key")
common.APIJWTSecret = common.RandomJWTKey()
}
} else {
logging.DiscardLogger()
}