[break] change auth config & add auth key

This commit is contained in:
wjqserver 2025-04-01 18:32:45 +08:00
parent 978ece6fa0
commit 395f641468
8 changed files with 50 additions and 27 deletions

View file

@ -114,7 +114,7 @@ func Matcher(rawPath string, cfg *config.Config) (string, string, string, error)
user = parts[1]
}
if !cfg.Auth.ForceAllowApi {
if cfg.Auth.AuthMethod != "header" || !cfg.Auth.Enabled {
if cfg.Auth.Method != "header" || !cfg.Auth.Enabled {
return "", "", "", ErrAuthHeaderUnavailable
}
}