Skip to content

Commit f821cd5

Browse files
committed
Fixed strict domain blocking requests to mask domains
1 parent ad8cc67 commit f821cd5

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

aiohttp_dynamic/routing.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,17 @@ async def resolve(self, request: web_request.Request) -> typing.Tuple[typing.Opt
701701

702702
# Propagate resolve
703703
if r.domain_match(request.headers.get(hdrs.HOST, None)):
704-
return await r.resolve(request)
704+
705+
# Try to resolve
706+
match_info, allowed_methods = await r.resolve(request)
707+
708+
# Allowed methods is empty -> no handler found at all
709+
if match_info is None and len(allowed_methods) == 0:
710+
continue
711+
712+
# Allowed methods is not empty -> found handler for certain path
713+
else:
714+
return match_info, allowed_methods
705715

706716
# Return empty sets
707717
return None, set()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
setup(
44
name = 'aiohttp_dynamic',
55
packages = ['aiohttp_dynamic'],
6-
version = '1.1.2',
6+
version = '1.1.3',
77
license='Apache License 2.0',
88
description = 'aiohttp extension for creating and modifying dynamic routes in runtime',
99
author = 'bitrate16',
1010
author_email = '[email protected]',
1111
url = 'https://github.com/bitrate16/aiohttp-dynamic',
12-
download_url = 'https://github.com/bitrate16/aiohttp-dynamic/archive/1.1.2.tar.gz',
12+
download_url = 'https://github.com/bitrate16/aiohttp-dynamic/archive/1.1.3.tar.gz',
1313
keywords = ['aiohttp', 'dynamic', 'routing', 'mutable', 'aiohttp-server'],
1414
install_requires = [
1515
'aiohttp',

0 commit comments

Comments
 (0)