Giter Club home page Giter Club logo

Comments (11)

willdurand avatar willdurand commented on June 30, 2024

The admin and the public parts of your "site" should be two separate projects IMO

from fosjsroutingbundle.

merk avatar merk commented on June 30, 2024

I think that given symfony2's ability to have multiple firewalls (and that the docs no longer recommend having a frontend and backend controller), the request is something that should be considered (should a PR land)

from fosjsroutingbundle.

 avatar commented on June 30, 2024

I too have dire need in this feature, exposing backend route structure for everybody is not very secure.
Also having used symfony2, i've tried different approaches for separating frontend and backend code, and using 2 separate projects for this - is not a viable option, as front and backend share tons of code. The most common practice is:

  1. Having FrontBundle, CoreBundle for shared code and BackBundle for admin functionality.
  2. http://stackoverflow.com/a/8016867/255408

It would be great to be able to have route collections for that reason, and i'm sure there are many other use-cases for that.

from fosjsroutingbundle.

michelpa avatar michelpa commented on June 30, 2024

+1 for this feature

from fosjsroutingbundle.

paxal avatar paxal commented on June 30, 2024

Hi,

I also think it is a useful feature, for projects with a single application, for security reasons (that's why I'm here !).

I added a few lines to the code to handle this.

This is a small description of what I done (which is not much) :

  • I added a "--set" argument to commands
  • If a set is specified, then in the routes extractor, I check the "expose_set" route option to check if they are the same, and add the route to exposed routes collection or not
  • By default (the "default" set), all the routes with "expose_set" option set to "default" or without "expose_set" option are extracted

What do you think of the feature ?

Diff is at https://github.com/paxal/FOSJsRoutingBundle/compare/multiple-sets

from fosjsroutingbundle.

stof avatar stof commented on June 30, 2024

I think this feature is interesting. Could you open a PR with your change ? It will be easier to comment on it to provide review (I have some change to request about the way it is implemented)

from fosjsroutingbundle.

willdurand avatar willdurand commented on June 30, 2024

👍

from fosjsroutingbundle.

paxal avatar paxal commented on June 30, 2024

PR submitted with id #108

from fosjsroutingbundle.

gentisaliu avatar gentisaliu commented on June 30, 2024

+1

from fosjsroutingbundle.

tishma avatar tishma commented on June 30, 2024

How about a regex set definition? Don't you think it's a waste of time/error prone to have to remember and annotate each and every action?

from fosjsroutingbundle.

willdurand avatar willdurand commented on June 30, 2024

Discussion continues in #108

from fosjsroutingbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.