convert config to yaml file

This commit is contained in:
2023-11-27 18:07:37 +08:00
parent 3cc507a767
commit de3bea06a7
8 changed files with 28 additions and 83 deletions

View File

@@ -21,7 +21,7 @@ func handleAuth(c *gin.Context) error {
authorization = strings.Trim(authorization[len("Bearer"):], " ")
log.Println("Received authorization", authorization)
for _, auth := range strings.Split(authConfig.Value, ",") {
for _, auth := range strings.Split(config.Authorization, ",") {
if authorization != strings.Trim(auth, " ") {
err = errors.New("wrong authorization header")
c.AbortWithError(403, err)