mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-18 00:53:23 +01:00
enforce provisioning websocket timeouts
This commit is contained in:
committed by
ravi-signal
parent
8c2f3c839f
commit
c2e3ab832c
@@ -102,10 +102,6 @@ public class WebSocketClient {
|
||||
return WebsocketHeaders.parseReceiveStoriesHeader(value);
|
||||
}
|
||||
|
||||
public boolean supportsProvisioningSocketTimeouts() {
|
||||
return session.getUpgradeRequest().getHeader(WebsocketHeaders.X_SIGNAL_WEBSOCKET_TIMEOUT_HEADER) != null;
|
||||
}
|
||||
|
||||
private long generateRequestId() {
|
||||
return Math.abs(SECURE_RANDOM.nextLong());
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ package org.whispersystems.websocket;
|
||||
*/
|
||||
public class WebsocketHeaders {
|
||||
public final static String X_SIGNAL_RECEIVE_STORIES = "X-Signal-Receive-Stories";
|
||||
public static final String X_SIGNAL_WEBSOCKET_TIMEOUT_HEADER = "X-Signal-Websocket-Timeout";
|
||||
|
||||
public static boolean parseReceiveStoriesHeader(String s) {
|
||||
return "true".equals(s);
|
||||
|
||||
Reference in New Issue
Block a user