Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

use module path-to-regexp for path #14

Open
safareli opened this issue May 6, 2016 · 2 comments
Open

use module path-to-regexp for path #14

safareli opened this issue May 6, 2016 · 2 comments

Comments

@safareli
Copy link

safareli commented May 6, 2016

It will be nice if we use path-to-regexp so we could use express like path format instead of writing regex directly.

@akshay-nm
Copy link

I am doing this:

 .unless({
  path: [
    { url: pathToRegexp('/something/:somethingElse'), methods: ["POST"] }
  ]
})

@jfromaniello
Copy link
Owner

cool! I know this is a very old thread, I am not sure how can we do this as currently if url is string we do a equal comparison

if (typeof p === 'string') {
return p === url;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants