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 :/
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 :/