We’ve started our journey with a fully SPA approach and encountered a problem with our preview.
The documentation is pretty clear, telling us to configure just 2 properties on the CMS side, which are:
- Virtual host responseheaders
hst:responseheaders: ['Access-Control-Allow-Origin: https://localhost:3000'] to prevent cross origin problems.
- The actual preview url
org.hippoecm.hst.configuration.channel.PreviewURLChannelInfo_urlin channel settings
So, since we’re not going to redirect our domain to our localhost, I would like to configure these URL’s differently for each environment This works perfectly fine with the virtual hosts, since we configure them for each domain anyways, but not for the channel settings… I am looking for options here. Personally I don’t get the reason for this property to be on such a unpractical location, if someone could explain me this as well that would be nice .
Maybe a note to the Bloomreach Documentation Team, It would love to see more SPA best practices and examples. Especially for the most common / bigger modules such as Relavance, Eforms, Content blocks etc… Maybe it would be an idea to include some of these modules in the demo project.
Looking forward to any suggestions on how to solve this environment specific config issue!