Skip to content

Finish case sensitivity settings in sub routers #17

Open

Description

@jthomerson

See

// TODO: case sensitivity settings (strict and end need to remain false here):

Activity

  1. added this to the 1.0.0 milestone on Feb 26, 2019
  2. yokuze commented on Feb 28, 2019

    @yokuze
    Contributor

    It turns out that, in Express, route settings are not inherited from parent to child routers. In this example:

    const router1 = express.Router({ caseSensitive: true }),
          router1 = express.Router();
    
    router2.get('/World', (req, resp, next) => { console.log('uppercase /World'); next(); });
    router2.get('/world', (req, resp, next) => { console.log('lowercase /world'); next(); });
    router2.get('*', (req, resp) => { resp.send('world'); });
    
    router1.use('/hello', router2);
    app.use('/', router1);

    router2 does not inherit router1's case sensitivity settings.

    We should adjust our current behavior to avoid inheriting router settings.

  3. added a commit that references this issue on Mar 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions