chore: enable all origins in cors settings
This commit is contained in:
parent
ee2698a41c
commit
d39d859e2b
2 changed files with 7 additions and 13 deletions
|
|
@ -33,6 +33,6 @@ if [ "${PUBLISH}" = true ]; then
|
|||
echo "logging in"
|
||||
aws ecr get-login-password --region "${AWS_REGION}" | docker login --username AWS --password-stdin "${AWS_REPOSITORY}"
|
||||
fi
|
||||
docker push "${FULL_IMAGE_NAME}" &&
|
||||
docker push "${FULL_IMAGE_NAME}:latest" && docker push "${FULL_IMAGE_NAME}:${VERSION}" &&
|
||||
echo "Successfully pushed docker image ${FULL_IMAGE_NAME} to ECR repository"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ logging.basicConfig(
|
|||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if os.getenv("ENV") == "prod":
|
||||
if os.getenv("ENV", "prod") == "prod":
|
||||
sentry_sdk.init(
|
||||
dsn = os.getenv("SENTRY_REPORTING_URL"),
|
||||
traces_sample_rate = 1.0,
|
||||
|
|
@ -40,17 +40,11 @@ async def lifespan(app: FastAPI):
|
|||
await get_default_user()
|
||||
yield
|
||||
|
||||
app = FastAPI(debug = os.getenv("ENV") != "prod", lifespan = lifespan)
|
||||
|
||||
origins = [
|
||||
"http://127.0.0.1:3000",
|
||||
"http://frontend:3000",
|
||||
"http://localhost:3000",
|
||||
]
|
||||
app = FastAPI(debug = os.getenv("ENV", "prod") != "prod", lifespan = lifespan)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=origins,
|
||||
allow_origins = ["*"],
|
||||
allow_credentials = True,
|
||||
allow_methods = ["OPTIONS", "GET", "POST", "DELETE"],
|
||||
allow_headers = ["*"],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue