Skip to content

Commit 71e5ae1

Browse files
committed
update item endpoint check
1 parent 680b32e commit 71e5ae1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stac_auth_proxy/utils/filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Utility functions."""
22

3+
import re
34
from urllib.parse import parse_qs, urlencode
45

56
from cql2 import Expr
@@ -29,4 +30,4 @@ def is_collection_endpoint(path: str) -> bool:
2930
def is_item_endpoint(path: str) -> bool:
3031
"""Check if the path is an item endpoint."""
3132
# TODO: Expand this to cover all cases where an item filter should be applied
32-
return path == "/collection/{collection_id}/items"
33+
return bool(re.compile(r"^/collections/([^/]+)/items$").match(path))

0 commit comments

Comments
 (0)