You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently FosJSRoutingBundle can be configured in the following ways to output the routes. First one is by adding expose: true parameter to specific routes e.g.:
Now I came to the issue. Sometimes there is the case that you have additional application with different routes. So you want to have a second endpoint to provide them as you maybe don't want that routes for application a can be seen by users from application b.
Actually, we have similar issue as well. We have two set of APIs exposed by server application. Two consumers are using those two sets of routes. We would benefit as well if we could export different groups of routes as well, compiled javascript with routes would be smaller.
Current Situation
Currently FosJSRoutingBundle can be configured in the following ways to output the routes. First one is by adding
expose: true
parameter to specific routes e.g.:The second one is by configuring specifc routes to be outputed:
And then you add the following to your twig:
This works great.
Issue
Now I came to the issue. Sometimes there is the case that you have additional application with different routes. So you want to have a second endpoint to provide them as you maybe don't want that routes for application a can be seen by users from application b.
Proposal Add expode_group attribute
The second one is by configuring specifc routes to be outputed:
As you want maybe have the routes behind a firewall best would be that the application itself defines to route to the js routing.
something like this should then also work:
The controller provided by the bundle get then
$group
parameter and only returns the route for that specific group.What do you think about this idea?
The text was updated successfully, but these errors were encountered: