2020-06-05 01:09:55 +02:00
|
|
|
from fastapi import FastAPI
|
2020-09-30 23:53:26 +02:00
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
2020-09-03 18:31:52 +02:00
|
|
|
from app.routes import router
|
2020-09-30 23:53:26 +02:00
|
|
|
from constants import origins
|
2020-03-23 21:17:16 +01:00
|
|
|
|
2020-06-05 01:09:55 +02:00
|
|
|
app = FastAPI()
|
2020-09-03 18:31:52 +02:00
|
|
|
app.include_router(router)
|
2020-09-30 23:53:26 +02:00
|
|
|
app.add_middleware(
|
|
|
|
CORSMiddleware,
|
|
|
|
allow_origins=origins,
|
|
|
|
allow_credentials=True,
|
|
|
|
allow_methods=["*"],
|
|
|
|
allow_headers=["*"],
|
|
|
|
)
|