From 4add1c70e9b219924a79ceb641f7cdfaeaf93bd1 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 12 Aug 2014 17:13:14 +0100 Subject: [PATCH] Just say yes to OPTIONS requests, since we want to turn on CORS headers for all paths --- synapse/http/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/http/server.py b/synapse/http/server.py index 8823aade78..9fb45971d5 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -96,6 +96,11 @@ class TwistedHttpServer(HttpServer, resource.Resource): path. """ try: + # Just say yes to OPTIONS. + if request.method == "OPTIONS": + self._send_response(request, 200, {}) + return + # Loop through all the registered callbacks to check if the method # and path regex match for path_entry in self.path_regexs.get(request.method, []):