diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-17 18:29:05 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-17 18:29:05 +0200 |
commit | 47180572bf1c2fe6bd9f6f05ee59c28c4509db9c (patch) | |
tree | c2f88f6d867758520829aa23725e9ac9784282e7 /api/main.py | |
parent | 13985ac694283f1f8d3ca802cccef851ed966e20 (diff) |
Add CORS
Diffstat (limited to 'api/main.py')
-rw-r--r-- | api/main.py | 10 |
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) |