We have implemented a headless site that serves up content to a multi-site, multi-culture website in Umbraco 8. The front-end is Vue.js, with nuxt.js.
The way we made it work is by implementing custom Content Finders that look for a custom HTTP header from the FE called frontend-host that contains the domain of the site we're requesting from the api. the api would run on a single domain called api.site.com
This all works well for the routing, but when it comes to Umbraco's redirect tracker, it falls over, because the Request Host is api.site.com/page and not site1.com/page, and the redirect is for site1.com/page to site1.com/page1
What can I do here? How can I tap into the Redirect handler in Umbraco, and potentially replace it?
For those looking, I fixed this by creating a new ContentFinderByRedirectUrl and replaced the default with a new one that determines domain based on the current frontend-host request header.
I copied the code from the source code. Hackety hack.
Redirect on Multisite Headless Umbraco 8 Build
We have implemented a headless site that serves up content to a multi-site, multi-culture website in Umbraco 8. The front-end is Vue.js, with nuxt.js.
The way we made it work is by implementing custom Content Finders that look for a custom HTTP header from the FE called frontend-host that contains the domain of the site we're requesting from the api. the api would run on a single domain called api.site.com
This all works well for the routing, but when it comes to Umbraco's redirect tracker, it falls over, because the Request Host is api.site.com/page and not site1.com/page, and the redirect is for site1.com/page to site1.com/page1
What can I do here? How can I tap into the Redirect handler in Umbraco, and potentially replace it?
For those looking, I fixed this by creating a new ContentFinderByRedirectUrl and replaced the default with a new one that determines domain based on the current frontend-host request header.
I copied the code from the source code. Hackety hack.
Hi Gabor,
have you got any articles or resources that would help get started with Umbraco & Nuxt?
is working on a reply...