summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2014-08-12 17:13:14 +0100
committerErik Johnston <erikj@matrix.org>2014-08-12 17:17:14 +0100
commit4add1c70e9b219924a79ceb641f7cdfaeaf93bd1 (patch)
tree6a7aca2d85ddd01aee10c0ddf27a6ffa96d8f6e2
parentMake messages list and room users list scroll-overflow (diff)
downloadsynapse-4add1c70e9b219924a79ceb641f7cdfaeaf93bd1.tar.xz
Just say yes to OPTIONS requests, since we want to turn on CORS headers for all paths
-rw-r--r--synapse/http/server.py5
1 files changed, 5 insertions, 0 deletions
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, []):