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"
|
echo "logging in"
|
||||||
aws ecr get-login-password --region "${AWS_REGION}" | docker login --username AWS --password-stdin "${AWS_REPOSITORY}"
|
aws ecr get-login-password --region "${AWS_REGION}" | docker login --username AWS --password-stdin "${AWS_REPOSITORY}"
|
||||||
fi
|
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"
|
echo "Successfully pushed docker image ${FULL_IMAGE_NAME} to ECR repository"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ logging.basicConfig(
|
||||||
)
|
)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
if os.getenv("ENV") == "prod":
|
if os.getenv("ENV", "prod") == "prod":
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn = os.getenv("SENTRY_REPORTING_URL"),
|
dsn = os.getenv("SENTRY_REPORTING_URL"),
|
||||||
traces_sample_rate = 1.0,
|
traces_sample_rate = 1.0,
|
||||||
|
|
@ -40,20 +40,14 @@ async def lifespan(app: FastAPI):
|
||||||
await get_default_user()
|
await get_default_user()
|
||||||
yield
|
yield
|
||||||
|
|
||||||
app = FastAPI(debug = os.getenv("ENV") != "prod", lifespan = lifespan)
|
app = FastAPI(debug = os.getenv("ENV", "prod") != "prod", lifespan = lifespan)
|
||||||
|
|
||||||
origins = [
|
|
||||||
"http://127.0.0.1:3000",
|
|
||||||
"http://frontend:3000",
|
|
||||||
"http://localhost:3000",
|
|
||||||
]
|
|
||||||
|
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=origins,
|
allow_origins = ["*"],
|
||||||
allow_credentials=True,
|
allow_credentials = True,
|
||||||
allow_methods=["OPTIONS", "GET", "POST", "DELETE"],
|
allow_methods = ["OPTIONS", "GET", "POST", "DELETE"],
|
||||||
allow_headers=["*"],
|
allow_headers = ["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
from cognee.api.v1.users.routers import get_auth_router, get_register_router,\
|
from cognee.api.v1.users.routers import get_auth_router, get_register_router,\
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue