Skip to content

Commit

Permalink
Merge pull request #1608 from jjmengze/patch-1
Browse files Browse the repository at this point in the history
fix Options response header
  • Loading branch information
mtibben authored Sep 10, 2021
2 parents ed8054b + 682a7d6 commit 1116ea6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphql/handler/transport/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func (o Options) Supports(r *http.Request) bool {
func (o Options) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
switch r.Method {
case http.MethodOptions:
w.WriteHeader(http.StatusOK)
w.Header().Set("Allow", "OPTIONS, GET, POST")
w.WriteHeader(http.StatusOK)
case http.MethodHead:
w.WriteHeader(http.StatusMethodNotAllowed)
}
Expand Down

0 comments on commit 1116ea6

Please sign in to comment.