blob: b7975b57befc6506f6ddf13f8428a169155a93b2 [file] [log] [blame]
const proxy = require('http-proxy-middleware');
module.exports = function(app) {
app.use(proxy('/onos', {
"target": "http://localhost:8181/onos/v1",
"pathRewrite": {
"^/onos": "",
},
"secure": false,
"preserveHeaderKeyCase": true,
"headers": {
"Authorization": "Basic b25vczpyb2Nrcw=="
}
}))
app.use(proxy('/dcs', {
"target": "http://localhost:8181/onos/restconf",
"pathRewrite": {
"^/dcs": "",
},
"secure": false,
"preserveHeaderKeyCase": true,
"headers": {
"Authorization": "Basic b25vczpyb2Nrcw=="
}
}))
}