mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:44:53 -04:00
Start phasing out HttpServer: we should be using Resources instead. Added resource_for_client/federation/web_client to the HomeServer and hooked the C-S servlets to operate on resource_for_client. Dynamically construct the Resource tree.
This commit is contained in:
parent
e7736668ba
commit
9f863d3466
7 changed files with 101 additions and 21 deletions
|
@ -16,6 +16,8 @@
|
|||
""" This module contains base REST classes for constructing REST servlets. """
|
||||
import re
|
||||
|
||||
CLIENT_PREFIX = "/matrix/client/api/v1"
|
||||
|
||||
|
||||
def client_path_pattern(path_regex):
|
||||
"""Creates a regex compiled client path with the correct client path
|
||||
|
@ -27,7 +29,7 @@ def client_path_pattern(path_regex):
|
|||
Returns:
|
||||
SRE_Pattern
|
||||
"""
|
||||
return re.compile("^/matrix/client/api/v1" + path_regex)
|
||||
return re.compile("^" + CLIENT_PREFIX + path_regex)
|
||||
|
||||
|
||||
class RestServlet(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue