Skip to content
Snippets Groups Projects
Commit 829e49c8 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 81c62efa
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,14 @@ try { ...@@ -87,6 +87,14 @@ try {
var ClientData = []; var ClientData = [];
var ServerData = []; 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 // Loop while we're still connected on both ends
while ((client.socket.is_connected) && (FServerSocket.is_connected)) { while ((client.socket.is_connected) && (FServerSocket.is_connected)) {
// Should we yield or not (default true, but disable if we had line activity) // 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.
Please register or to comment