Getting HMR erros when trying to setup and multi tenant application and using subdomain on localhost
Answered
American Crocodile posted this in #help-forum
American CrocodileOP
I'm using subdomains at my localhost to mimic the the behavious of my multi tenant website.
The way I'm implementing this is checking the existence of subdomain on my middlware and adding a custom header that I can check on server components when needed.
The problem is during developemnt I have use-websocket.ts:16 WebSocket connection to 'ws://subdomain.localhost:3000/_next/webpack-hmr' failed: and what appear too as 403 on my fonts GET http://subdomain.localhost:3000/_next/static/media/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw-s.p.7b3669ea.woff2 net::ERR_ABORTED 403 (Forbidden)
Anyone know have any pointers to fix those issues?
The way I'm implementing this is checking the existence of subdomain on my middlware and adding a custom header that I can check on server components when needed.
The problem is during developemnt I have use-websocket.ts:16 WebSocket connection to 'ws://subdomain.localhost:3000/_next/webpack-hmr' failed: and what appear too as 403 on my fonts GET http://subdomain.localhost:3000/_next/static/media/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw-s.p.7b3669ea.woff2 net::ERR_ABORTED 403 (Forbidden)
Anyone know have any pointers to fix those issues?
2 Replies
Japanese Bobtail
Answer
American CrocodileOP
@Japanese Bobtail Thanks! I will folow that thread. I did work for me on 15.3.0-canary-17 to use allowedDevOrigins: ["name.localhost"], at the root of next.config, wildcard are not working yet