I am making a website that handles subdomains, I have setup an environment variable called base_host and now I want to use this into the @route annotation in Symfony 4.
I have tried sofar: @Route("/", name="homepage", host="{afdeling}.{domain}", defaults={"domain"="%env(base_host)%"}, requirements={"domain"="%env(base_host)%"}) but this give me an error: using %env(base_host)% is not allowed in routing configuration
I have also tried: @Route("/", name="homepage", host="{afdeling}.%env(base_host)%") this did not work at all.
also what I have tried is: @Route("/", name="homepage", host="{afdeling}.{domain}", defaults={"domain"="%base_host%"}, requirements={"domain"="%base_host%"}) but this gives me the error message: The parameter "base_host" must be defined.
how can I achieve this?