Skip to content

Commit a8857e0

Browse files
authored
Fix issue with strip_prefixes
1 parent c8cf3ba commit a8857e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: aws_lambda_powertools/event_handler/api_gateway.py

+2
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ def _remove_prefix(self, path: str) -> str:
546546
return path
547547

548548
for prefix in self._strip_prefixes:
549+
if path == prefix:
550+
return "/"
549551
if self._path_starts_with(path, prefix):
550552
return path[len(prefix) :]
551553

0 commit comments

Comments
 (0)