From 10e843da584282d0c393c2d7be3c772f362fe69a Mon Sep 17 00:00:00 2001 From: Robert Swain Date: Fri, 28 Apr 2017 17:13:36 +0200 Subject: [PATCH] mediaapi/routing: Remove OPTIONS handling from GET endpoint --- .../matrix-org/dendrite/mediaapi/routing/routing.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/mediaapi/routing/routing.go b/src/github.com/matrix-org/dendrite/mediaapi/routing/routing.go index 5e40b140d..5319d9caa 100644 --- a/src/github.com/matrix-org/dendrite/mediaapi/routing/routing.go +++ b/src/github.com/matrix-org/dendrite/mediaapi/routing/routing.go @@ -36,12 +36,6 @@ type downloadRequestHandler struct { func (handler downloadRequestHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { util.SetupRequestLogging(req) - if req.Method == "OPTIONS" { - util.SetCORSHeaders(w) - w.WriteHeader(200) - return - } - // Set common headers returned regardless of the outcome of the request util.SetCORSHeaders(w) w.Header().Set("Content-Type", "application/json")