summary refs log tree commit diff
path: root/synapse/app/homeserver.py
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2020-07-01 09:10:23 -0400
committerPatrick Cloke <patrickc@matrix.org>2020-07-02 09:58:31 -0400
commitea26e9a98b0541fc886a1cb826a38352b7599dbe (patch)
tree4bd1846684cbbc1b9db97f3f5671f1e0cd54e1b2 /synapse/app/homeserver.py
parentFix changelog wording (diff)
downloadsynapse-ea26e9a98b0541fc886a1cb826a38352b7599dbe.tar.xz
Ensure that HTML pages served from Synapse include headers to avoid embedding.
Diffstat (limited to 'synapse/app/homeserver.py')
-rw-r--r--synapse/app/homeserver.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index 8454d74858..41994dc14b 100644
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -56,6 +56,7 @@ from synapse.http.server import (
     OptionsResource,
     RootOptionsRedirectResource,
     RootRedirect,
+    StaticResource,
 )
 from synapse.http.site import SynapseSite
 from synapse.logging.context import LoggingContext
@@ -228,7 +229,7 @@ class SynapseHomeServer(HomeServer):
         if name in ["static", "client"]:
             resources.update(
                 {
-                    STATIC_PREFIX: File(
+                    STATIC_PREFIX: StaticResource(
                         os.path.join(os.path.dirname(synapse.__file__), "static")
                     )
                 }