Skip to content

Commit cd64125

Browse files
committed
feat: add debug endpoint
1 parent 3903e89 commit cd64125

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/stac_auth_proxy/app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI:
6363
methods=methods,
6464
)
6565

66+
if settings.debug:
67+
app.add_api_route(
68+
"/_debug",
69+
lambda: {"settings": settings},
70+
methods=["GET"],
71+
)
72+
6673
# Catchall for remainder of the endpoints
6774
app.add_api_route(
6875
"/{path:path}",

src/stac_auth_proxy/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def __call__(self, token_dependency):
2828
class Settings(BaseSettings):
2929
"""Configuration settings for the STAC Auth Proxy."""
3030

31+
debug: bool = False
32+
3133
upstream_url: HttpUrl = HttpUrl(url="https://earth-search.aws.element84.com/v1")
3234
oidc_discovery_url: HttpUrl
3335

0 commit comments

Comments
 (0)