mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init auth cookies
This commit is contained in:
parent
8cc727e309
commit
9479a4b127
5 changed files with 27 additions and 15 deletions
11
app.py
11
app.py
|
|
@ -2,6 +2,11 @@ from fastapi import FastAPI
|
|||
from src.main import global_router
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
########################
|
||||
# Pre-Alpha Version 0.1.0
|
||||
# Author: @swve
|
||||
# (c) LearnHouse 2022
|
||||
########################
|
||||
|
||||
# Init
|
||||
app = FastAPI(
|
||||
|
|
@ -10,18 +15,18 @@ app = FastAPI(
|
|||
version="0.1.0",
|
||||
root_path="/"
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_origins=["http://localhost:3000"],
|
||||
allow_methods=["*"],
|
||||
allow_credentials=True,
|
||||
allow_headers=["*"],
|
||||
allow_headers=["*"]
|
||||
)
|
||||
|
||||
app.include_router(global_router)
|
||||
|
||||
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return {"Message": "Welcome to LearnHouse ✨"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue