Now you can modify the baseUrl; a feature which Express' app.use already provides..
// mount on "/users" and keep the "/users" base path
app.use('/user', createProxyMiddleware({'target': 'https://jsonplaceholder.typicode.com/users'}))
// mount on "/users" and change the "/users" base path
app.use('/user', createProxyMiddleware({'target': 'https://jsonplaceholder.typicode.com/customers'}))
Coverage decreased (-0.007%) to 98.788% when pulling 91c57154bb95d71bfb3ab28c362ba0531646989f on fix-originalUrl into 8a2e7a6c6db8eb6a91c88e8fb9959e24acc64ca7 on v3.
Description
Fixes incorrect usage of
originalUrl
. Introduced in https://github.com/chimurai/http-proxy-middleware/pull/18Now you can modify the
baseUrl
; a feature which Express'app.use
already provides..Motivation and Context
How has this been tested?
Types of changes
Checklist: