Subdomains, how can I tell Vaadin page which subdomain

My app is serving different subdomains, how can I check in code if the request is made by a specific subdomain?

UI.getCurrent().getPage().fetchCurrentURL(url -> {
  // do something with the url
}

is there a way to get it direct not from a differed thread, like from the BeforeEnterEvent?

Found it with VaadinRequest.getCurrent()…getHeader(“referer”);

It’s not from another thread. But be careful those don’t do the same and if the the referer header is not set it doesn’t work

fetchUrl gets the URL from the browser

seems I can get the domain from the “referer” from the VaadinRequest, but I cant get it from the ServletController!!