2 Commits

Author SHA1 Message Date
6c149e844b 💥 Remove /widget static endpoint
This endpoint shall be served by a dedicated static HTTP server.
2023-06-13 05:45:33 +02:00
f5529bba24 Merge branch 'remove-db-filling-from-backend' into develop 2023-06-13 05:44:00 +02:00

View File

@@ -4,7 +4,6 @@ import uvicorn
from contextlib import asynccontextmanager
from fastapi import FastAPI, Request
from fastapi.middleware.cors import CORSMiddleware
from fastapi.staticfiles import StaticFiles
from fastapi_cache import FastAPICache
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
@@ -41,7 +40,6 @@ app.add_middleware(
allow_headers=["*"],
)
app.mount("/widget", StaticFiles(directory="../frontend/", html=True), name="widget")
# The cache-control header entry is not managed properly by fastapi-cache:
# For now, a request with a cache-control set to no-cache
@@ -60,7 +58,6 @@ async def fastapi_cache_issue_144_workaround(request: Request, call_next):
return await call_next(request)
app.include_router(line.router)
app.include_router(stop.router)