From e6eba0732f795aba433cb4099499fac3658b1fa4 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 15 Jan 2024 00:34:09 +0530 Subject: [PATCH] chore: minor refactor --- src/link_liberate/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/link_liberate/main.py b/src/link_liberate/main.py index 68051b4..1a23afe 100644 --- a/src/link_liberate/main.py +++ b/src/link_liberate/main.py @@ -31,7 +31,7 @@ BASE_URL: str = r"http://0.0.0.0:8080" BASE_DIR: Path = Path(__file__).resolve().parent -app.mount("/static", StaticFiles(directory=str(Path(BASE_DIR, "static"))), name="static") + app.add_middleware( CORSMiddleware, allow_origins=origins, @@ -41,6 +41,7 @@ ) templates: Jinja2Templates = Jinja2Templates(directory=str(Path(BASE_DIR, "templates"))) +app.mount("/static", StaticFiles(directory=str(Path(BASE_DIR, "static"))), name="static") @app.get("/", response_class=HTMLResponse)