Skip to content

Commit

Permalink
Return HTTP OK on CORS Options request
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman committed Mar 26, 2024
1 parent 4f55cda commit 31799af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/oauth/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,12 @@ func (o *oauth) ServeHTTP(w http.ResponseWriter, req *http.Request) {
return
}

if req.Method == http.MethodOptions {
w.WriteHeader(http.StatusOK)
w.Write(nil)
return
}

q := req.URL.Query()
errStr := q.Get("error")
if errStr != "" {
Expand Down

0 comments on commit 31799af

Please sign in to comment.