добавление CORS
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@ __pycache__/
|
|||||||
|
|
||||||
# Логи
|
# Логи
|
||||||
*.log
|
*.log
|
||||||
|
.venv
|
||||||
|
|
||||||
# Виртуальное окружение
|
# Виртуальное окружение
|
||||||
# venv/
|
# venv/
|
||||||
|
|||||||
2
main.py
2
main.py
@@ -14,7 +14,7 @@ app = FastAPI(title="Work BD Auth API",
|
|||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["*"], # или список конкретных доменов
|
allow_origins=["https://allowlgroup.ru","http://localhost:5173", "http://45.129.78.228:8000"], # или список конкретных доменов
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["*"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
|
|||||||
BIN
requirements.txt
Normal file
BIN
requirements.txt
Normal file
Binary file not shown.
Reference in New Issue
Block a user