Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make req.route an object saving route and baseUrl #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 24, 2016

  1. Make req.route an object saving route and baseUrl

    When using an error handler you have access to req.route
    which describes the most recently matched route. However,
    some other informaiton (like req.baseUrl) gets changed
    before the error handler runs.
    
    This commit changes req.route to an object that also contains
    the req.baseUrl before it gets changed.
    
    Since the actual route object is not scoped to the current
    event, this commit instead uses a new object to store the
    baseUrl but sets the __proto__ to the route object so that
    all its properties are also available.
    tunniclm committed Feb 24, 2016
    Configuration menu
    Copy the full SHA
    6df224c View commit details
    Browse the repository at this point in the history