Skip to content

Commit

Permalink
fix: exclude DELETE requests from email authorized checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Sep 27, 2024
1 parent 42cae61 commit 57356f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (a *API) isValidAuthorizedEmail(w http.ResponseWriter, req *http.Request) (
ctx := req.Context()

// skip checking for authorized email addresses if it's an admin request
if strings.HasPrefix(req.URL.Path, "/admin") || req.Method == http.MethodGet {
if strings.HasPrefix(req.URL.Path, "/admin") || req.Method == http.MethodGet || req.Method == http.MethodDelete {
return ctx, nil
}

Expand Down

0 comments on commit 57356f7

Please sign in to comment.