summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/apps/connectApp/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/apps/connectApp/webpack.config.js')
-rw-r--r--sdnr/wt/odlux/apps/connectApp/webpack.config.js48
1 files changed, 35 insertions, 13 deletions
diff --git a/sdnr/wt/odlux/apps/connectApp/webpack.config.js b/sdnr/wt/odlux/apps/connectApp/webpack.config.js
index 7f36e4e17..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,34 +126,54 @@ module.exports = (env) => {
stats: {
colors: true
},
- proxy: {
- "/oauth2/": {
- target: "http://sdnr:8181",
+ 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
},
-
- "/oauth/": {
- target: "http://sdnr:8181",
- secure: false
- },
"/database/": {
- target: "http://sdnr:8181",
+ target: "http://localhost:18181",
secure: false
},
"/restconf/": {
- target: "http://sdnr:8181",
+ target: "http://localhost:18181",
secure: false
},
"/rests/": {
- target: "http://sdnr:8181",
+ target: "http://localhost:18181",
secure: false
},
"/help/": {
- target: "http://sdnr:8181",
+ target: "http://localhost:18181",
+ secure: false
+ },
+ "/about/": {
+ target: "http://localhost:18181",
+ secure: false
+ },
+ "/tree/": {
+ target: "http://localhost:18181",
secure: false
},
"/websocket": {
- target: "http://sdnr:8181",
+ target: "http://localhost:18181",
+ ws: true,
+ changeOrigin: true,
+ secure: false
+ },
+ "/apidoc": {
+ target: "http://localhost:18181",
ws: true,
changeOrigin: true,
secure: false