The build works fine and the build runner is even picking up my variables from the wrangler.toml cor
The build works fine and the build runner is even picking up my variables from the wrangler.toml correctly, so I’m pretty sure it’s well-formed
wrangler.toml differently? idkwrangler.toml, Dash settings started updating too, together with build vars.wrangler.toml should at least be applied to the deployment, even if it may not apply to the project
DashBoardLayout file doing? What is the createRemoteDatabaseClient doing? That's where the error is from
// Setup CORS for the frontend'
.use('/trpc/*', async (c, next) => {
if (c.env.APP_NEXT_URL === undefined || c.env.APP_SPA_URL === undefined) {
console.log(
'APP_URL is not set. CORS errors may occur. Make sure the .dev.vars file is present at /packages/api/.dev.vars',
)
}
return await cors({
origin: (origin) => {
const appHost = new URL(c.env.APP_NEXT_URL).host
const spaHost = new URL(c.env.APP_SPA_URL).host
const preview = 'http://localhost:8788' // cloudflare pages preview
console.log('Origin: ', origin)
return origin.endsWith(appHost) || origin.endsWith(spaHost) || origin.endsWith(preview)
? origin
: c.env.APP_NEXT_URL
},
credentials: true, // https://trpc.io/docs/client/cors
allowMethods: ['GET', 'POST', 'OPTIONS'],
// https://hono.dev/middleware/builtin/cors#options
})(c, next)
})