We shipped a fix for this recently to help agent identify the right place for this. Probably the issue is that the vite.config.js is for the client, the server has a config in vite.ts that it uses, you need to add allowedHosts: true to that vite.ts’ server config . Agent picks up the vite.config.js first before it goes into server’s directory so it gets tripped up. There’s an explicit fix for this shipped now so should not happen on new repls.
Mark, my bad I should have shared that I clicked on the vite.ts file on the left-hand panel that contains the files and found the lines below starting on line 36 (your code may be on a different line). The corrected code has " allowedHosts: true," added as a line.
server: {
middlewareMode: true,
hmr: { server },
<this is the final fix, notice the extra line of code>
server: {
middlewareMode: true,
allowedHosts: true,
hmr: { server },
</this is the final fix, notice the extra line of code>