webpack-dev-server icon indicating copy to clipboard operation
webpack-dev-server copied to clipboard

hardcoded sockjs iframe url

Open Zekfad opened this issue 2 years ago • 5 comments

Why this is hardcoded? https://github.com/webpack/webpack-dev-server/blob/95e26fea168440c0f694c16478aae672091d06a3/lib/servers/SockJSServer.js#L46

In our project this is failing because we have a different from __webpack_dev_server__ path.

Zekfad avatar Mar 19 '22 20:03 Zekfad

Hmm, we can add an option for this.

snitin315 avatar Mar 20 '22 03:03 snitin315

Hmm, we can add an option for this.

That would be nice!

Zekfad avatar Mar 20 '22 09:03 Zekfad

Why you need to change it? It is potential security problem

alexander-akait avatar Mar 20 '22 12:03 alexander-akait

Because we have only a few restricted paths lead to a webpack server backend in development. Also its a security problem not to change it, as it can be a really easy for scanners and so on.

Also I expected that this URL is supposed to be the same as devServer.webSocketServer.options.path setting.

Zekfad avatar Mar 20 '22 17:03 Zekfad

Okay PR welcome

alexander-akait avatar Mar 21 '22 12:03 alexander-akait