mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-08 15:33:09 -06:00
mediaapi/routing: Remove OPTIONS handling from GET endpoint
This commit is contained in:
parent
42a390f8fe
commit
10e843da58
|
|
@ -36,12 +36,6 @@ type downloadRequestHandler struct {
|
||||||
func (handler downloadRequestHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
func (handler downloadRequestHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
util.SetupRequestLogging(req)
|
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
|
// Set common headers returned regardless of the outcome of the request
|
||||||
util.SetCORSHeaders(w)
|
util.SetCORSHeaders(w)
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue