X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=sdnr%2Fwt%2Fodlux%2Fapps%2FconnectApp%2Fwebpack.config.js;h=df88a80a90244e060eda0e923914a49c73143a64;hb=21e4a946cd24b8a03ea577352f0271ebf7669ffa;hp=7b0a517144b8ad1eee87bb3a86b516c569cd1905;hpb=057a0db19bacdd7d963cad39be1163139e7128e2;p=ccsdk%2Ffeatures.git diff --git a/sdnr/wt/odlux/apps/connectApp/webpack.config.js b/sdnr/wt/odlux/apps/connectApp/webpack.config.js index 7b0a51714..df88a80a9 100644 --- a/sdnr/wt/odlux/apps/connectApp/webpack.config.js +++ b/sdnr/wt/odlux/apps/connectApp/webpack.config.js @@ -11,6 +11,8 @@ const webpack = require("webpack"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const TerserPlugin = require('terser-webpack-plugin'); +const policies = require('./policies.json'); + // const __dirname = (path => path.replace(/^([a-z]\:)/, c => c.toUpperCase()))(process.__dirname()); module.exports = (env) => { @@ -124,29 +126,54 @@ module.exports = (env) => { stats: { colors: true }, - proxy: { - "/oauth2/": { - target: "http://10.20.6.29:48181", + before: function(app, server, compiler) { + app.get('/oauth/policies',(_, res) => res.json(policies)); + }, + proxy: { + "/about": { + target: "http://localhost:18181", + secure: false + }, + "/yang-schema/": { + target: "http://localhost:18181", + secure: false + }, + "/oauth/": { + target: "http://localhost:18181", secure: false }, "/database/": { - target: "http://10.20.6.29:48181", + target: "http://localhost:18181", secure: false }, "/restconf/": { - target: "http://10.20.6.29:48181", + target: "http://localhost:18181", secure: false }, "/rests/": { - target: "http://10.20.6.29:48181", + target: "http://localhost:18181", secure: false }, "/help/": { - target: "http://10.20.6.29:48181", + target: "http://localhost:18181", + secure: false + }, + "/about/": { + target: "http://localhost:18181", + secure: false + }, + "/tree/": { + target: "http://localhost:18181", secure: false }, "/websocket": { - target: "http://10.20.6.29:48181", + target: "http://localhost:18181", + ws: true, + changeOrigin: true, + secure: false + }, + "/apidoc": { + target: "http://localhost:18181", ws: true, changeOrigin: true, secure: false