summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorRasmus Luha <rasmus.luha@gmail.com>2022-03-17 18:29:05 +0200
committerRasmus Luha <rasmus.luha@gmail.com>2022-03-17 18:29:05 +0200
commit47180572bf1c2fe6bd9f6f05ee59c28c4509db9c (patch)
treec2f88f6d867758520829aa23725e9ac9784282e7 /api
parent13985ac694283f1f8d3ca802cccef851ed966e20 (diff)
Add CORS
Diffstat (limited to 'api')
-rw-r--r--api/main.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/api/main.py b/api/main.py
index e4d90f8..8465083 100644
--- a/api/main.py
+++ b/api/main.py
@@ -4,7 +4,15 @@ import pandas as pd
app = FastAPI()
-#CORS STUFF HERE
+#/CORS STUFF HERE
+origins = ["*"]
+app.add_middleware(
+ CORSMiddleware,
+ allow_origins=origins,
+ allow_methods=["*"],
+ allow_headers=["*"],
+)
+
app.include_router(get.router)