mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-17 08:49:07 -05:00
Add reactor to SynapseRequest and fix up types. (#10868)
This commit is contained in:
parent
fa74536384
commit
50022cff96
24 changed files with 123 additions and 82 deletions
|
|
@ -29,7 +29,6 @@ import attr
|
|||
|
||||
from twisted.internet.defer import Deferred
|
||||
from twisted.internet.error import DNSLookupError
|
||||
from twisted.web.server import Request
|
||||
|
||||
from synapse.api.errors import Codes, SynapseError
|
||||
from synapse.http.client import SimpleHttpClient
|
||||
|
|
@ -168,7 +167,7 @@ class PreviewUrlResource(DirectServeJsonResource):
|
|||
self._start_expire_url_cache_data, 10 * 1000
|
||||
)
|
||||
|
||||
async def _async_render_OPTIONS(self, request: Request) -> None:
|
||||
async def _async_render_OPTIONS(self, request: SynapseRequest) -> None:
|
||||
request.setHeader(b"Allow", b"OPTIONS, GET")
|
||||
respond_with_json(request, 200, {}, send_cors=True)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue