reverse proxy added

added tests for reverse proxy too
This commit is contained in:
Илья Глазунов
2025-12-03 00:05:11 +03:00
parent e2646a752a
commit 5262c5e1fb
7 changed files with 899 additions and 8 deletions
+2 -1
View File
@@ -33,9 +33,10 @@ class RoutingExtension(Extension):
from .routing import create_router_from_config
regex_locations = config.get("regex_locations", {})
default_proxy_timeout = config.get("default_proxy_timeout", 30.0)
self.router = create_router_from_config(regex_locations)
from .routing import RequestHandler
self.handler = RequestHandler(self.router)
self.handler = RequestHandler(self.router, default_proxy_timeout=default_proxy_timeout)
async def process_request(self, request: Request) -> Optional[Response]:
try: