mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-18 20:55:18 +01:00
Consistently use HttpHeaders.X_FORWARDED_FOR
This commit is contained in:
committed by
Jon Chambers
parent
7764185c57
commit
e078161e2f
@@ -5,6 +5,7 @@
|
||||
package org.whispersystems.websocket;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.net.HttpHeaders;
|
||||
import com.google.protobuf.UninitializedMessageException;
|
||||
import org.eclipse.jetty.websocket.api.MessageTooLargeException;
|
||||
import org.eclipse.jetty.websocket.api.RemoteEndpoint;
|
||||
@@ -201,7 +202,7 @@ public class WebSocketResourceProvider<T extends Principal> implements WebSocket
|
||||
|
||||
@VisibleForTesting
|
||||
static boolean shouldIncludeRequestMessageHeader(final String header) {
|
||||
return !"X-Forwarded-For".equalsIgnoreCase(header.trim());
|
||||
return !HttpHeaders.X_FORWARDED_FOR.equalsIgnoreCase(header.trim());
|
||||
}
|
||||
|
||||
private void handleResponse(WebSocketResponseMessage responseMessage) {
|
||||
|
||||
Reference in New Issue
Block a user