diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-22 08:35:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 08:35:55 -0400 |
commit | 514a240aedd972e6c8b707a7685c3d283f8618c9 (patch) | |
tree | 52e476ced593d0cb695c567a6c40afe4151c8c82 /synapse/rest/client/v1/room.py | |
parent | Don't 500 for invalid group IDs (#8628) (diff) | |
download | synapse-514a240aedd972e6c8b707a7685c3d283f8618c9.tar.xz |
Remove unused OPTIONS handlers. (#8621)
The handling of OPTIONS requests was consolidated in #7534, but the endpoint specific handlers were not removed.
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 00b4397082..25d3cc6148 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -72,20 +72,6 @@ class RoomCreateRestServlet(TransactionRestServlet): def register(self, http_server): PATTERNS = "/createRoom" register_txn_path(self, PATTERNS, http_server) - # define CORS for all of /rooms in RoomCreateRestServlet for simplicity - http_server.register_paths( - "OPTIONS", - client_patterns("/rooms(?:/.*)?$", v1=True), - self.on_OPTIONS, - self.__class__.__name__, - ) - # define CORS for /createRoom[/txnid] - http_server.register_paths( - "OPTIONS", - client_patterns("/createRoom(?:/.*)?$", v1=True), - self.on_OPTIONS, - self.__class__.__name__, - ) def on_PUT(self, request, txn_id): set_tag("txn_id", txn_id) @@ -104,9 +90,6 @@ class RoomCreateRestServlet(TransactionRestServlet): user_supplied_config = parse_json_object_from_request(request) return user_supplied_config - def on_OPTIONS(self, request): - return 200, {} - # TODO: Needs unit testing for generic events class RoomStateEventRestServlet(TransactionRestServlet): |