upstream asis

This commit is contained in:
2023-09-16 10:52:33 +08:00
parent 1fcdc59b63
commit 043fb3db85
2 changed files with 8 additions and 3 deletions

View File

@@ -20,7 +20,8 @@ func handleAuth(c *gin.Context) error {
authorization = strings.Trim(authorization[len("Bearer"):], " ")
log.Println("Received authorization", authorization)
if authorization != authConfig.Value {
if authConfig.Value != "asis" && authorization != authConfig.Value {
err = errors.New("wrong authorization header")
c.AbortWithError(403, err)
return err