Add Websocket Upgrade Test (#5613)

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
This commit is contained in:
PoleTransformer
2025-11-27 21:05:44 +01:00
committed by GitHub
co-authored by Your Name Frank Elsinga Louis Lam
parent 804344c5ac
commit 5d1b372072
9 changed files with 406 additions and 10 deletions
+10
View File
@@ -100,6 +100,8 @@ class Monitor extends BeanModel {
parent: this.parent,
childrenIDs: preloadData.childrenIDs.get(this.id) || [],
url: this.url,
wsIgnoreSecWebsocketAcceptHeader: this.getWsIgnoreSecWebsocketAcceptHeader(),
wsSubprotocol: this.wsSubprotocol,
method: this.method,
hostname: this.hostname,
port: this.port,
@@ -276,6 +278,14 @@ class Monitor extends BeanModel {
return Boolean(this.ignoreTls);
}
/**
* Parse to boolean
* @returns {boolean} Should WS headers be ignored?
*/
getWsIgnoreSecWebsocketAcceptHeader() {
return Boolean(this.wsIgnoreSecWebsocketAcceptHeader);
}
/**
* Parse to boolean
* @returns {boolean} Is the monitor in upside down mode?