Skip to content

Commit

Permalink
Respond to OPTIONS requests on /query endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnaraasen authored and toddboom committed Jul 28, 2015
1 parent 6c0a91f commit b237c68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/httpd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func NewHandler(requireAuthentication, loggingEnabled, writeTrace bool) *Handler
}

h.SetRoutes([]route{
route{
"query", // Satisfy CORS checks.
"OPTIONS", "/query", true, true, h.serveOptions,
},
route{
"query", // Query serving route.
"GET", "/query", true, true, h.serveQuery,
Expand All @@ -99,7 +103,7 @@ func NewHandler(requireAuthentication, loggingEnabled, writeTrace bool) *Handler
"GET", "/shard_mapping", true, true, h.serveShardMapping,
},
route{
"write", // Data-ingest route.
"write", // Satisfy CORS checks.
"OPTIONS", "/write", true, true, h.serveOptions,
},
route{
Expand Down

0 comments on commit b237c68

Please sign in to comment.