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

path can't be set in proxyReqOptDecorator as documented #243

Closed
BasHamer opened this issue Jun 15, 2017 · 2 comments
Closed

path can't be set in proxyReqOptDecorator as documented #243

BasHamer opened this issue Jun 15, 2017 · 2 comments
Labels

Comments

@BasHamer
Copy link

if the proxyReqPathResolver method is not provided but you set the path in proxyReqOptDecorator then the path gets overwritten with the original path by the default for proxyReqPathResolver.

code:
proxyReqOptDecorator : function(proxyReq, originalReq) {
proxyReq.path = 'bob';
return proxyReq;
},

by itself will have no effect, you need to add
proxyReqPathResolver: function(req) {
return 'bob';
},

to make that work.

The documentation is misleading on this subject :/

@monkpow
Copy link
Collaborator

monkpow commented Jun 15, 2017

oof, thanks for that. I'll update the docs.

@monkpow monkpow added the bug label Jun 21, 2017
monkpow added a commit that referenced this issue Jun 21, 2017
@monkpow
Copy link
Collaborator

monkpow commented Jun 21, 2017

Thanks for this. This is as designed, but the docs were absolutely wrong. I'm sure that was frustrating to debug.

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

No branches or pull requests

2 participants