Skip to content

Commit

Permalink
fix(api): Allow OPTIONS header so that CORS is available
Browse files Browse the repository at this point in the history
  • Loading branch information
dustmop committed Apr 27, 2021
1 parent b6298ce commit e067500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (inst *Instance) GiveAPIServer(middleware func(handler http.HandlerFunc) ht
handler := middleware(NewHTTPRequestHandler(inst, methodName))
// All endpoints use POST verb
httpVerb := http.MethodPost
m.Handle(string(call.Endpoint), handler).Methods(httpVerb)
m.Handle(string(call.Endpoint), handler).Methods(httpVerb, http.MethodOptions)
}
return m
}
Expand Down

0 comments on commit e067500

Please sign in to comment.