Skip to content
Snippets Groups Projects

Add readonly, public metadata service

+ 4
1
@@ -20,6 +20,7 @@ ERROR_CODE_MESSAGES = {
503: "Service Unavailable",
}
METADATA_ENDPOINT = bool(os.getenv("METADATA_ENDPOINT", False))
VERSION = os.getenv("GEOMAG_VERSION", "version")
@@ -28,9 +29,11 @@ app = FastAPI(docs_url="/docs", root_path="/ws")
app.include_router(algorithms.router)
app.include_router(data.router)
app.include_router(elements.router)
app.include_router(metadata.router)
app.include_router(observatories.router)
if METADATA_ENDPOINT:
app.include_router(metadata.router)
@app.middleware("http")
async def add_headers(request: Request, call_next):
Loading