Skip to content
Permalink
Browse files
fix: proxy to secured websocket server (#10045)
  • Loading branch information
shyim committed Sep 9, 2022
1 parent 9f8d79b commit 9de9bc477638ec46d2e80e6e66ec4f3eb6b439e9
Showing 1 changed file with 3 additions and 1 deletion.
@@ -88,7 +88,9 @@ export function proxyMiddleware(
if (doesProxyContextMatchUrl(context, url)) {
const [proxy, opts] = proxies[context]
if (
(opts.ws || opts.target?.toString().startsWith('ws:')) &&
(opts.ws ||
opts.target?.toString().startsWith('ws:') ||
opts.target?.toString().startsWith('wss:')) &&
req.headers['sec-websocket-protocol'] !== HMR_HEADER
) {
if (opts.rewrite) {

0 comments on commit 9de9bc4

Please sign in to comment.