mirror of
https://git.eaglercraft.rip/eaglercraft/eaglercraft-1.5.git
synced 2025-01-22 07:21:52 -05:00
Add full support for x-forwarded-for headers.
This commit is contained in:
parent
98e00d7d22
commit
0248832073
5 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ public class WebSocketListener extends WebSocketServer {
|
|||
String s = arg1.getFieldValue(info.getForwardedIPHeader());
|
||||
if(s != null) {
|
||||
try {
|
||||
addr = InetAddress.getByName(s);
|
||||
addr = InetAddress.getByName(s.split(",", 2)[0]);
|
||||
}catch(UnknownHostException e) {
|
||||
System.out.println("invalid '" + info.getForwardedIPHeader() + "' header - " + e.toString());
|
||||
arg0.close();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue