You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating the following stack: bun create better-t-stack@latest better-t-stack --yes --frontend native next --backend next --runtime node --api orpc --database none --orm none --no-auth --addons biome husky turborepo. (Turbopack with nextjs server, nextjs web and RN expo)
In a monorepo multiple apps consume a single api. The CORS middleware on the server should have support for that.
In this stack next web runs on :3001 and RN web on :8081.
I would like to propose the following change:
in apps/server/.env change CORS env to CORS_ORIGINS=http://localhost:3001,http://localhost:8081
Then in the middleware we can get the origin of the request by doing something like this
When creating the following stack:
bun create better-t-stack@latest better-t-stack --yes --frontend native next --backend next --runtime node --api orpc --database none --orm none --no-auth --addons biome husky turborepo
. (Turbopack with nextjs server, nextjs web and RN expo)In a monorepo multiple apps consume a single api. The CORS middleware on the server should have support for that.
In this stack next web runs on
:3001
and RN web on:8081
.I would like to propose the following change:
in
apps/server/.env
change CORS env toCORS_ORIGINS=http://localhost:3001,http://localhost:8081
Then in the middleware we can get the origin of the request by doing something like this
The text was updated successfully, but these errors were encountered: