Skip to content

Commit 7076c2b

Browse files
Techbot121Meta Construct
authored andcommitted
fix splitting on the wrong string
1 parent f28edcc commit 7076c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/services/gamebridge/GameBridge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class GameBridge extends Service {
5656

5757
async handleConnection(req: WebSocketRequest): Promise<void> {
5858
const ip = req.httpRequest.socket.remoteAddress;
59-
const forwarded = req.httpRequest.headers["x-forwarded-for"]?.[0].split(",")[0];
59+
const forwarded = req.httpRequest.headers["x-forwarded-for"]?.toString()?.split(",")[0];
6060

6161
for (const connection of this.ws.connections) {
6262
if (ip == connection.remoteAddress) {

0 commit comments

Comments
 (0)