-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add ability to intercept websocket messages #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
const acceptExtensions = ({extenstions, isServer}) => { | ||
const {extensionName} = PerMessageDeflate; | ||
const extenstion = extenstions[extensionName]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extension
и extensions[]
– t
лишняя
|
||
_configure() { | ||
const secWsExtensions = this._proxyRes.headers['sec-websocket-extensions']; | ||
const extenstions = Extensions.parse(secWsExtensions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extensions
_configure() { | ||
const secWsExtensions = this._proxyRes.headers['sec-websocket-extensions']; | ||
const extenstions = Extensions.parse(secWsExtensions); | ||
this._isCompressed = secWsExtensions && secWsExtensions.indexOf('permessage-deflate') != -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему не secWsExtensions.includes('permessage-deflate')
?
// need both versions of extensions for each side of the proxy connection | ||
this._clientExtenstions = this._isCompressed ? acceptExtensions({extenstions, isServer: false}) : null; | ||
this._serverExtenstions = this._isCompressed ? acceptExtensions({extenstions, isServer: true}) : null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_clientExtensions
& _serverExtensions
, {extensions...
No description provided.