T
TanStack5mo ago
vicious-gold

Blocked request

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.
9 Replies
dependent-tan
dependent-tan5mo ago
this should only apply to a dev build ... strange how do you deploy?
vicious-gold
vicious-goldOP5mo ago
i deployed it on vercel Its a dev build How can i fix this?
dependent-tan
dependent-tan5mo ago
why deploy a dev build? just deploy a prod build
vicious-gold
vicious-goldOP5mo ago
I will do that 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.
dependent-tan
dependent-tan5mo ago
can you provide a complete example repo please? did you set the deployment preset to vercel?
vicious-gold
vicious-goldOP5mo ago
https://github.com/moa-mel/tanstack-app Yes, I set the deployment preset to vercel
GitHub
GitHub - moa-mel/tanstack-app: This is to test how tanstack work wi...
This is to test how tanstack work with seo-tags. Contribute to moa-mel/tanstack-app development by creating an account on GitHub.
vicious-gold
vicious-goldOP5mo ago
How can I resolve this?
dependent-tan
dependent-tan5mo ago
why is the .vercel folder in the git repo? i would remove that and let vercel build it
vicious-gold
vicious-goldOP5mo ago
Okay

Did you find this page helpful?