Skip to content

Commit

Permalink
Add actionable info to missing APP_URL warning
Browse files Browse the repository at this point in the history
  • Loading branch information
janwirth authored Nov 24, 2023
1 parent 5120ea9 commit 7f0d3cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const app = new Hono<{ Bindings: Bindings }>()
// Setup CORS for the frontend
app.use('/trpc/*', async (c, next) => {
if (c.env.APP_URL === undefined) {
console.log('APP_URL is not set. CORS errors may occur.')
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: [c.env.APP_URL],
Expand Down

0 comments on commit 7f0d3cb

Please sign in to comment.