diff --git a/command/oauth/cmd.go b/command/oauth/cmd.go index 949cdd819..4b3bcaaea 100644 --- a/command/oauth/cmd.go +++ b/command/oauth/cmd.go @@ -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 != "" {