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

update router to check req.url matched path #160

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

Conversation

twhtanghk
Copy link

For special case with req.url 'http://host/user/vm/counter' and

router =
  '/vm/': 'http://192.168.1.1:8000'
  '/user/': 'http://192.179.1.1:8001'

Router would forward the request to 1st matched handler instead of the expected 2nd handler. This pull request is to ensure the matching to the first character of path or hostAndPath. Please review.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.97% when pulling f540fad on twhtanghk:master into cb5e084 on chimurai:master.

1 similar comment
@coveralls
Copy link

coveralls commented Mar 31, 2017

Coverage Status

Coverage remained the same at 96.97% when pulling f540fad on twhtanghk:master into cb5e084 on chimurai:master.

@chimurai
Copy link
Owner

chimurai commented Apr 1, 2017

Hi. Thanks for the PR.

Think the fix looks valid.

Can you fix the code warnings and provide a test plan?

https://github.com/chimurai/http-proxy-middleware/blob/master/test/unit/router.spec.js

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

Successfully merging this pull request may close these issues.

None yet

3 participants