Skip to content

Commit

Permalink
fix: proxy to secured websocket server
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Sep 8, 2022
1 parent 9f8d79b commit eafa6e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/middlewares/proxy.ts
Expand Up @@ -88,7 +88,7 @@ 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) {
Expand Down

0 comments on commit eafa6e3

Please sign in to comment.