diff --git a/webapp/packages/core-cli/configs/webpack.product.dev.config.js b/webapp/packages/core-cli/configs/webpack.product.dev.config.js index 970fcee4af..d094edbee8 100644 --- a/webapp/packages/core-cli/configs/webpack.product.dev.config.js +++ b/webapp/packages/core-cli/configs/webpack.product.dev.config.js @@ -11,7 +11,6 @@ const webpack = require('webpack'); const httpProxy = require('http-proxy'); const { EsbuildPlugin } = require('esbuild-loader'); const fs = require('fs'); -const { URL } = require('url'); const commonConfig = require('./webpack.config.js'); const ssoHtmlTemplate = require.resolve('@cloudbeaver/plugin-sso/src/index.html.ejs'); @@ -43,7 +42,6 @@ if (fs.existsSync(certPath) && fs.existsSync(keyPath)) { module.exports = (env, argv) => { const envServer = env.server ?? process.env.server; - const urlObject = new URL(envServer); return merge(commonConfig(env, argv), { mode: 'development', @@ -73,15 +71,10 @@ module.exports = (env, argv) => { server, proxy: [ { - context: ['/api'], + context: ['/api', '/api/ws'], target: envServer, secure: false, - }, - { - context: ['/api/ws'], - target: `${urlObject.protocol === 'https:' ? 'wss:' : 'ws:'}//${urlObject.hostname}:${urlObject.port}/api/ws`, ws: true, - secure: false, }, ], // onListening: function (devServer, ...args) {