Skip to content

Commit 5855492

Browse files
sampsapennaJoonatan Mäkinen
authored andcommitted
allow anonymous get to id cache for discovery
1 parent 3da2964 commit 5855492

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

swift_browser_ui/common/common_middleware.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ async def handle_validate_authentication(
6565
handler: swift_browser_ui.common.types.AiohttpHandler,
6666
) -> aiohttp.web.Response:
6767
"""Handle the authentication of a response as a middleware function."""
68+
# TODO: better configuration for conditional skipping of anonymous endpoints
6869
if request.path == "/health":
6970
return await handler(request)
71+
if "/ids/" in request.path and request.method in {"GET", "OPTIONS"}:
72+
return await handler(request)
7073

7174
try:
7275
signature = request.query["signature"]

0 commit comments

Comments
 (0)