C
Coder.com2mo ago
Cat

Port Forwarding Issue with Nginx Swag Reverse Proxy

Blocked request. This host ("3000--main--portfolio-cat--developmentcats.blah") is not allowed. To allow this host, add "3000--main--portfolio-cat--developmentcats.coder.blah" to server.allowedHosts in vite.config.js. I have the DNS entries for *.coder and coder. both going to the correct place and this is my reverse proxy config
13 Replies
Codercord
Codercord2mo ago
<#1349458857667072040>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Cat
CatOP2mo ago
Port forwarding works fine through VSCode though I just cant utilize the wildcard domain to point to the port over my domain
Phorcys
Phorcys2mo ago
could you send a screenshot of that "To allow this host, add "3000--main--portfolio-cat--developmentcats.coder.chesher.xyz" to server.allowedHosts in vite.config.js." message? or is it inside your CLI? @Cat
Cat
CatOP2mo ago
In browser
Cat
CatOP2mo ago
No description
Phorcys
Phorcys2mo ago
I suppose you're hosting a vite app?
Cat
CatOP2mo ago
OMG Wow I feel like a dumbass But yeah I didn't realize that the internal app was the one passing that error back to the browser but that makes alot of sense
Phorcys
Phorcys2mo ago
I mean, it might seem silly but, have you tried editing server.allowedHosts no worries lol though it's weird and vite shouldn't block this by default, maybe something in your config makes it more secure i guess
Cat
CatOP2mo ago
are we sure that this is not referring to vite for Coder or does coder not use vite at all No you were right it was definitely that lmao
Phorcys
Phorcys2mo ago
Coder might use vite, i'm not sure, but it definitely doesn't use vite's dev server for serving the app, which is what that is
Cat
CatOP2mo ago
Well thank you regardless at least I know im not crazy now XD
Phorcys
Phorcys2mo ago
no worries :-)
Codercord
Codercord2mo ago
@Phorcys closed the thread.

Did you find this page helpful?