FOSJsRoutingBundle
FOSJsRoutingBundle copied to clipboard
Non standard http port on route with "host" parameter defined
When generating a route defined with the host parameter :
test_route:
host: www.test.com
path: /MyTest
defaults: { _controller: TestBundle:Test:Test }
the function Routing.generate('test_route') always generate an absolute URL using the host defined in the "host:" parameter of the route. But if the http port is not the standard port, it seems there is no way for Routing.generate to add this port to the absolute generated Url.
I tried with the parameters :
framework:
router:
http_port: 81
parameters:
router.request_context.host: 81
The URL generated shoud be http://www.test.com:81/MyTest but the one generated is http://www.test.com/MyTest
I was not using the master version, the issue is now solved
No in fact, it wasn't fully solved !
@chandon so what is the status of this?
This is still an open issue on the latest stable (1.6.0 as of today) and looking at the code on master it doesn't seem to have been fixed.
I think we'll have to wait 2 more years before #185 been merged :)