diff --git a/.gitignore b/.gitignore index 9ff36d4..7565fd2 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ database.db # pytest .pytest_cache/ + +# vercel +.vercel diff --git a/app/main.py b/app/main.py index 339bd38..88566c8 100644 --- a/app/main.py +++ b/app/main.py @@ -7,14 +7,12 @@ from app.api.user_information.api import user_information_router from app.auth.api import auth_router from app.emailmanager.api import email_router +from app.settings import FRONTEND_URL app = FastAPI() origins = [ - "http://localhost", - "http://localhost:8080", - "http://localhost:8000", - "http://localhost:3000", + f"{FRONTEND_URL}", ] app.add_middleware( diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..66530cd --- /dev/null +++ b/vercel.json @@ -0,0 +1,14 @@ +{ + "builds": [ + { + "src": "app/main.py", + "use": "@vercel/python" + } + ], + "routes": [ + { + "src": "/(.*)", + "dest": "app/main.py" + } + ] +} \ No newline at end of file