#Blocked request

16 messages · Page 1 of 1 (latest)

zealous schooner
#

After deploying to Vercel, I got a blocked request error:

"To allow this host, add 'hostname' to server.allowedHosts in vite.config.js."

However, I'm not using vite.config.js — my project uses app.config.ts instead.
I tried adding allowedHosts: ['hostname'], but I'm still getting the same error.

vivid coral
#

this should only apply to a dev build ... strange

#

how do you deploy?

zealous schooner
#

i deployed it on vercel

#

Its a dev build

#

How can i fix this?

vivid coral
#

why deploy a dev build?

#

just deploy a prod build

zealous schooner
#

I will do that

zealous schooner
#

I deployed a production build and, in the Vercel project settings, I set the root directory to '.vercel/output', but I'm still getting the same blocked request.

vivid coral
#

can you provide a complete example repo please?

#

did you set the deployment preset to vercel?

zealous schooner
zealous schooner
#

How can I resolve this?

vivid coral
#

why is the .vercel folder in the git repo?

#

i would remove that and let vercel build it