diff options
author | Erik Johnston <erik@matrix.org> | 2021-09-24 11:01:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 11:01:25 +0100 |
commit | 50022cff966a3991fbd8a1e5c98f490d9b335442 (patch) | |
tree | b3a86c3f0d2f8ef5ea352f5c671651e6169ab3b4 /synapse/rest/media/v1/download_resource.py | |
parent | Fix AuthBlocking check when requester is appservice (#10881) (diff) | |
download | synapse-50022cff966a3991fbd8a1e5c98f490d9b335442.tar.xz |
Add reactor to `SynapseRequest` and fix up types. (#10868)
Diffstat (limited to 'synapse/rest/media/v1/download_resource.py')
-rw-r--r-- | synapse/rest/media/v1/download_resource.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/rest/media/v1/download_resource.py b/synapse/rest/media/v1/download_resource.py index d6d938953e..6180fa575e 100644 --- a/synapse/rest/media/v1/download_resource.py +++ b/synapse/rest/media/v1/download_resource.py @@ -15,10 +15,9 @@ import logging from typing import TYPE_CHECKING -from twisted.web.server import Request - from synapse.http.server import DirectServeJsonResource, set_cors_headers from synapse.http.servlet import parse_boolean +from synapse.http.site import SynapseRequest from ._base import parse_media_id, respond_404 @@ -37,7 +36,7 @@ class DownloadResource(DirectServeJsonResource): self.media_repo = media_repo self.server_name = hs.hostname - async def _async_render_GET(self, request: Request) -> None: + async def _async_render_GET(self, request: SynapseRequest) -> None: set_cors_headers(request) request.setHeader( b"Content-Security-Policy", |