Closed
Description
Lines 29 to 31 in a5744b0
settings.py
class ApiSettings(pydantic.BaseSettings):
"""FASTAPI application settings."""
name: str = "titiler"
cors_origins: str = "*"
cachecontrol: str = "public, max-age=3600"
debug: bool = False
disable_cog: bool = False
disable_stac: bool = False
disable_mosaic: bool = False
main.py
...
if not api_settings.disable_cog:
app.include_router(cog.router, prefix="/cog", tags=["Cloud Optimized GeoTIFF"])
if not api_settings.disable_stac:
app.include_router(stac.router, prefix="/stac", tags=["SpatioTemporal Asset Catalog"])
if not api_settings.disable_mosaic:
app.include_router(mosaic.router, prefix="/mosaicjson", tags=["MosaicJSON"])
...
To disable /cog
the user will then have to set API_DISABLE_COG=TRUE