Hi,
I have a nuxt app, I push to heroku, and send mysubdom1.mydom.com to the app. The BaseUrl is defined in my nuxt.config.js as mysubdom1-admin.mydom.com.
It's working fine, but I would like to send mysubdom2.mydom.com to the same app.
And I would like to have the baseUrl, for now defined in my nuxt.config.js, to be mysubdom2-admin.mydom.com.
I tried to use nuxtServerInit, and nuxtClientInit with req.headers.host, but it didn't work.
I think I need to use a server middleware, but I can't find a proper example on how to do what I want.
If someone can point to a very basic exemple on how to do that, it would be of great help.
Thanks !
Hi, I have a nuxt app, I push to heroku, and send mysubdom1.mydom.com to the app. The BaseUrl is defined in my nuxt.config.js as mysubdom1-admin.mydom.com. It's working fine, but I would like to send mysubdom2.mydom.com to the same app. And I would like to have the baseUrl, for now defined in my nuxt.config.js, to be mysubdom2-admin.mydom.com. I tried to use nuxtServerInit, and nuxtClientInit with req.headers.host, but it didn't work. I think I need to use a server middleware, but I can't find a proper example on how to do what I want. If someone can point to a very basic exemple on how to do that, it would be of great help. Thanks !