Last active
February 11, 2024 17:35
-
-
Save rsyuzyov/f6be15bb3945a70a0414bac14c883476 to your computer and use it in GitHub Desktop.
setupProxy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { createProxyMiddleware } = require('http-proxy-middleware') | |
module.exports = function (app) { | |
app.use( | |
'/api', | |
createProxyMiddleware({ | |
target: 'http://host:port', | |
pathRewrite: { | |
'^/api': '/ibname/hs/servicename' | |
}, | |
changeOrigin: true, | |
}) | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment