Skip to content

Commit

Permalink
added check for no auth
Browse files Browse the repository at this point in the history
  • Loading branch information
stkr89 committed Feb 12, 2021
1 parent cc69b06 commit dbb4c5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const (

func checkAuthorization(r *http.Request, route *route) (string, int) {
for _, f := range getAuthCheckers() {
if route.Auth == nil {
continue
}

errStr, statusCode := f(r, route)
if errStr != "" {
return errStr, statusCode
Expand Down

0 comments on commit dbb4c5e

Please sign in to comment.