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

Added keepProxy to not rewrite the URL. #24

Merged
merged 2 commits into from
Sep 25, 2018
Merged

Added keepProxy to not rewrite the URL. #24

merged 2 commits into from
Sep 25, 2018

Conversation

mcollina
Copy link
Member

Fixes #23.

@clarkorz can you check if this works for you?

@clark0x
Copy link

clark0x commented Sep 24, 2018

@mcollina This works for some cases. But I prefer a rewritePrefix option, works for more cases:

   const rewritePrefix = opts.rewritePrefix || '';
   ...
   let dest = request.req.url
   if (this.basePath !== rewritePrefix) {
     dest.replace(this.basePath, rewritePrefix)
    }
   reply.from(dest || '/', opts.replyOptions)

@mcollina
Copy link
Member Author

Check it out!

@clark0x
Copy link

clark0x commented Sep 25, 2018

@mcollina LGTM

@mcollina mcollina merged commit 88d32e2 into master Sep 25, 2018
@mcollina mcollina deleted the keep-prefix branch September 25, 2018 08:58
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

2 participants