Skip to content

Commit

Permalink
Merge pull request #132 from QActf/CORS_rem_cors_test
Browse files Browse the repository at this point in the history
remove CORS for test
  • Loading branch information
CuriousGecko authored Sep 11, 2024
2 parents 191becc + 87234ac commit c5347b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class Settings(BaseSettings):
EMAIL_USE_TLS: bool = True
# ================================

host: str = 'localhost'

class Config:
env_file = 'infra/.env'
extra = "ignore"
Expand Down
10 changes: 0 additions & 10 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys

from fastapi import FastAPI, applications
from fastapi.middleware.cors import CORSMiddleware
from fastapi.openapi.docs import get_swagger_ui_html
from sqladmin import Admin

Expand Down Expand Up @@ -43,15 +42,6 @@ def swagger_monkey_patch(*args, **kwargs):
openapi_url="/api/openapi.json",
)

origins = [f'http://{settings.host}']

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=['*'],
allow_headers=['*'],
)
if "pytest" not in sys.modules:
app.add_middleware(LoggerMiddleware)

Expand Down

0 comments on commit c5347b9

Please sign in to comment.