Socket
Socket
Sign inDemoInstall

ws

Package Overview
Dependencies
3
Maintainers
4
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.8.0 to 8.8.1

17

lib/websocket.js

@@ -716,7 +716,7 @@ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */

opts.headers = {
...opts.headers,
'Sec-WebSocket-Version': opts.protocolVersion,
'Sec-WebSocket-Key': key,
Connection: 'Upgrade',
Upgrade: 'websocket',
...opts.headers
Upgrade: 'websocket'
};

@@ -775,4 +775,7 @@ opts.path = parsedUrl.pathname + parsedUrl.search;

if (websocket._redirects === 0) {
websocket._originalUnixSocket = isUnixSocket;
websocket._originalSecure = isSecure;
websocket._originalHost = parsedUrl.host;
websocket._originalHostOrSocketPath = isUnixSocket
? opts.socketPath
: parsedUrl.host;

@@ -793,3 +796,9 @@ const headers = options && options.headers;

} else if (websocket.listenerCount('redirect') === 0) {
const isSameHost = parsedUrl.host === websocket._originalHost;
const isSameHost = isUnixSocket
? websocket._originalUnixSocket
? opts.socketPath === websocket._originalHostOrSocketPath
: false
: websocket._originalUnixSocket
? false
: parsedUrl.host === websocket._originalHostOrSocketPath;

@@ -796,0 +805,0 @@ if (!isSameHost || (websocket._originalSecure && !isSecure)) {

{
"name": "ws",
"version": "8.8.0",
"version": "8.8.1",
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc