updating .gitreview
Started integration with ONOS
Change-Id: Ibc85844f406e460875099336b30bb67708800165
diff --git a/mCordPortal/bs-config.js b/mCordPortal/bs-config.js
index dcf8ce3..f078e45 100644
--- a/mCordPortal/bs-config.js
+++ b/mCordPortal/bs-config.js
@@ -27,13 +27,16 @@
target: conf.host || 'http://0.0.0.0:9999'
});
+var onos_proxy = httpProxy.createProxyServer({
+ target: conf.onos_host || 'http://10.50.1.15:8181'
+});
+
proxy.on('error', function(error, req, res) {
- console.log('------------------------------------------------------');
- // res.writeHead(500, {
- // 'Content-Type': 'text/plain'
- // });
console.error('[Proxy]', error);
- console.log('------------------------------------------------------');
+});
+
+onos_proxy.on('error', function(error, req, res) {
+ console.error('[ONOS Proxy]', error);
});
module.exports = {
@@ -68,6 +71,9 @@
// console.log(`proxied: ${req.url}`, req.headers['x-csrftoken'], req.headers.cookie);
proxy.web(req, res);
}
+ else if(req.url.indexOf('/onos/') !== -1){
+ onos_proxy.web(req, res);
+ }
else{
next();
}