Skip to content

Commit 8e16916

Browse files
committed
feat: expand default public endpoints and add default openapi endpoint
1 parent 5f00eca commit 8e16916

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/stac_auth_proxy/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ async def lifespan(app: FastAPI):
9292
).route,
9393
include_in_schema=False,
9494
)
95+
9596
if settings.healthz_prefix:
9697
app.include_router(
9798
HealthzHandler(upstream_url=str(settings.upstream_url)).router,

src/stac_auth_proxy/config.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ class Settings(BaseSettings):
4848
enable_compression: bool = True
4949

5050
# OpenAPI / Swagger UI
51-
openapi_spec_endpoint: Optional[str] = Field(pattern=_PREFIX_PATTERN, default=None)
51+
openapi_spec_endpoint: Optional[str] = Field(
52+
pattern=_PREFIX_PATTERN, default="/api"
53+
)
5254
openapi_auth_scheme_name: str = "oidcAuth"
5355
openapi_auth_scheme_override: Optional[dict] = None
54-
swagger_ui_endpoint: Optional[str] = None
56+
swagger_ui_endpoint: Optional[str] = Field(
57+
pattern=_PREFIX_PATTERN, default="/api.html"
58+
)
5559
swagger_ui_init_oauth: dict = Field(default_factory=dict)
5660

5761
# Auth
@@ -61,6 +65,7 @@ class Settings(BaseSettings):
6165
r"^/$": ["GET"],
6266
r"^/api.html$": ["GET"],
6367
r"^/api$": ["GET"],
68+
r"^/conformance$": ["GET"],
6469
r"^/docs/oauth2-redirect": ["GET"],
6570
r"^/healthz": ["GET"],
6671
}

0 commit comments

Comments
 (0)