summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-11-08 01:37:43 +1100
committerGitHub <noreply@github.com>2018-11-08 01:37:43 +1100
commitb3708830b847245a5d559a099fcaf738250b7cbe (patch)
treeab80ed9ed77afe01b04958d0b9b6f3ba94a087f9 /synapse/http
parentMerge pull request #4155 from rubo77/purge-api (diff)
downloadsynapse-b3708830b847245a5d559a099fcaf738250b7cbe.tar.xz
Fix URL preview bugs (type error when loading cache from db, content-type including quotes) (#4157)
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index b4b25cab19..6a427d96a6 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -468,13 +468,13 @@ def set_cors_headers(request):
     Args:
         request (twisted.web.http.Request): The http request to add CORs to.
     """
-    request.setHeader("Access-Control-Allow-Origin", "*")
+    request.setHeader(b"Access-Control-Allow-Origin", b"*")
     request.setHeader(
-        "Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS"
+        b"Access-Control-Allow-Methods", b"GET, POST, PUT, DELETE, OPTIONS"
     )
     request.setHeader(
-        "Access-Control-Allow-Headers",
-        "Origin, X-Requested-With, Content-Type, Accept, Authorization"
+        b"Access-Control-Allow-Headers",
+        b"Origin, X-Requested-With, Content-Type, Accept, Authorization"
     )