Closed florianajir closed 5 years ago
how are you initializing the router ? With the controller or with a dumped file ?
how are you initializing the router ? With the controller or with a dumped file ?
with a dumped file generated on build time directly on the hosted server with this command:
fos:js-routing:dump --format=json --target=assets/routes.json
But when I look in the file routes.json
all the routes are describe with relative url:
{
"base_url": "",
"routes": {
"en__RG__look_view": {
"tokens": [
[
"variable",
"\/",
"[^\/]++",
"slug"
],
[
"text",
"\/en\/look\/view"
]
],
"defaults": [],
"requirements": [],
"hosttokens": [],
"methods": [],
"schemes": []
}
}
}
Problem solved I found the solution in the doc sorry I misread a part about configuring the router in command context (I tried previously but forget to regenerate the file after)
Any more specific hint about how to solve this? I have no idea how to fix the generate command.
When I generate an url with absolute parameter = true from fosJsRoutingBundle the domain is not the good one; as classic symfony Router is able to produce.
eg:
Maybe I missed something in configuration ?
Note: My web server is php-fpm behind an nginx reverse proxy.