Skip to content
Snippets Groups Projects
Commit 820b805e authored by echicken's avatar echicken :chicken:
Browse files

If BBS is using HAProxy ([BBS] Options line has HAPROXY_PROTO)

then throw an error if X-Forwarded-For header was not received,
or otherwise do the HAProxy thing upon connecting.
parent a7604c63
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -87,6 +87,14 @@ try {
var ClientData = [];
var ServerData = [];
if (UsingHAProxy()) {
if (FWebSocketHeader['X-Forwarded-For'] !== undefined) {
// Do HAProxy stuff here
} else {
throw new Error('BBS is using HAProxy, but no X-Forwarded-For header present.');
}
}
// Loop while we're still connected on both ends
while ((client.socket.is_connected) && (FServerSocket.is_connected)) {
// Should we yield or not (default true, but disable if we had line activity)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment