From 6c149e844bb47ea3975e4c3ccafe69684c18e42d Mon Sep 17 00:00:00 2001 From: Adrien Date: Tue, 13 Jun 2023 05:45:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A5=20Remove=20/widget=20static=20endp?= =?UTF-8?q?oint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This endpoint shall be served by a dedicated static HTTP server. --- backend/main.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/main.py b/backend/main.py index d8b359b..93a4205 100755 --- a/backend/main.py +++ b/backend/main.py @@ -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)