Skip to content

Commit 9d1b9a0

Browse files
committed
Return HTTP OK on CORS Options request
1 parent 9f9412c commit 9d1b9a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

command/oauth/cmd.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,12 @@ func (o *oauth) ServeHTTP(w http.ResponseWriter, req *http.Request) {
10901090
return
10911091
}
10921092

1093+
if req.Method == http.MethodOptions {
1094+
w.WriteHeader(http.StatusOK)
1095+
w.Write(nil)
1096+
return
1097+
}
1098+
10931099
q := req.URL.Query()
10941100
errStr := q.Get("error")
10951101
if errStr != "" {

0 commit comments

Comments
 (0)