prevent panic when sse token is not found

This commit is contained in:
Jamie Curnow
2023-05-29 15:18:18 +10:00
parent 4dd6fd06f4
commit 3301800f42
2 changed files with 12 additions and 2 deletions

View File

@ -29,7 +29,7 @@ func DecodeAuth() func(http.Handler) http.Handler {
}
tokenAuth := jwtauth.New("RS256", privateKey, publicKey)
return jwtauth.Verify(tokenAuth, jwtauth.TokenFromHeader)
return jwtauth.Verify(tokenAuth, jwtauth.TokenFromHeader, jwtauth.TokenFromQuery)
}
// Enforce is a authentication middleware to enforce access from the