chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { Socket } from 'socket.io';
|
||||
|
||||
export function getSocketIp(socket: Socket) {
|
||||
return (
|
||||
(socket.handshake.headers['x-real-ip'] as string) ||
|
||||
socket.request.connection.remoteAddress ||
|
||||
''
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user