path can't be set in proxyReqOptDecorator as documented
BasHamer opened this issue · comments
Bas Hamer commented
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 :/
Nik Krimm commented
oof, thanks for that. I'll update the docs.
Nik Krimm commented
Thanks for this. This is as designed, but the docs were absolutely wrong. I'm sure that was frustrating to debug.