diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-05-22 09:30:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 09:30:07 -0400 |
commit | 4429764c9f00bd1d266f08e08a20daac1b849d46 (patch) | |
tree | 6b590b75e300860d8f9fbab36f47326dfed7fe38 /synapse/app/generic_worker.py | |
parent | Add ability to wait for replication streams (#7542) (diff) | |
download | synapse-4429764c9f00bd1d266f08e08a20daac1b849d46.tar.xz |
Return 200 OK for all OPTIONS requests (#7534)
Diffstat (limited to 'synapse/app/generic_worker.py')
-rw-r--r-- | synapse/app/generic_worker.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index a45c876213..a37520000a 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -22,7 +22,6 @@ from typing import Dict, Iterable from typing_extensions import ContextManager from twisted.internet import defer, reactor -from twisted.web.resource import NoResource import synapse import synapse.events @@ -41,7 +40,7 @@ from synapse.config.logger import setup_logging from synapse.federation import send_queue from synapse.federation.transport.server import TransportLayerServer from synapse.handlers.presence import BasePresenceHandler, get_interested_parties -from synapse.http.server import JsonResource +from synapse.http.server import JsonResource, OptionsResource from synapse.http.servlet import RestServlet, parse_json_object_from_request from synapse.http.site import SynapseSite from synapse.logging.context import LoggingContext @@ -566,7 +565,7 @@ class GenericWorkerServer(HomeServer): if name == "replication": resources[REPLICATION_PREFIX] = ReplicationRestResource(self) - root_resource = create_resource_tree(resources, NoResource()) + root_resource = create_resource_tree(resources, OptionsResource()) _base.listen_tcp( bind_addresses, |