I’m trying to read the subdomain while in the doBeforeRender() of my HstComponent. But I can’t seem to find the actual url that is being requested. I only get parts of the content path, for example /content/gallery/buyitdirect/image.png. How can I get the actual requested url by the client, for localhost I’m expecting something like http://subdomain.localhost:3000/etc.
I think I found a solution. I use request.getHeader(“origin”) on the HttpServletRequest. Which gives me something like http://subdomain.localhost:3000. And then I substring the subdomain from it.
@machak Your answer pushed me in the right direction.