-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Description
Hello, please help me with some problem.
My application divided into many services(bundles). Each service have some domains.
For example
foo_service:
resource: "@ServiceFooBundle/Resources/config/routing.yml"
host: "{_host}"
requirements:
_host: site1.com|site2.net|site3.org
prefix: /
bar_service:
resource: "@ServiceBarBundle/Resources/config/routing.yml"
host: "{_host}"
requirements:
_host: example1.com|somedomain2.net|test3.org
prefix: /
Symfony2 at the present time not supported filling "host" in router. I use this decision symfony/symfony#3965 (comment)
That is set route params in kernel listener like this
public function onKernelRequest(GetResponseEvent $event){
.....
$parameters = $request->attributes->get('_route_params');
$this->router->getContext()->setParameter('_host', $parameters['_host']);
.....
}
And when i generate route in js, _host replaced by undefined. How to fix this ?
Metadata
Metadata
Assignees
Labels
No labels