N
Nuxt8mo ago
vrijraj

Subdomains in Nuxt 3 Router / middleware

I want to allow both subdomains and custom domains. So localhost:3000 -> pages/app subdomain.localhost:3000 -> pages/subdomain i want unable to get the resources
2 Replies
Kyllian
Kyllian8mo ago
your best bet would be a reverse proxy I reckon
Dubem
Dubem8mo ago
You will also need a tool like CLoudflake or you DNS provider to setup a wildcard domain. You can thn point both your main domain and subdomain wildcard the machine/server hosting the build files. In your code you would need to get the id of the subdomain and fetch data accordingly.

Did you find this page helpful?