Skip to content

Commit

Permalink
only add necessary cors stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
chennisden committed Jun 5, 2024
1 parent ca8d490 commit f280dc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions store/app/api/routers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from fastapi import APIRouter, FastAPI, HTTPException, status
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel

from store.app.api.routers.users import users_router
from store.settings import settings

logger = logging.getLogger(__name__)

Expand All @@ -18,8 +20,8 @@

app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Allow all origins
# allow_credentials=True,
allow_origins=[settings.site.homepage], # Allow all origins
allow_credentials=True,
allow_methods=["*"], # Allow all methods
allow_headers=["*"], # Allow all headers
)
Expand Down

0 comments on commit f280dc6

Please sign in to comment.