mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 15:06:53 +00:00
enforce provisioning websocket timeouts
This commit is contained in:
1 parent
8c2f3c839f
commit
c2e3ab832c
5 files changed
+5
-39
No files matched your search
@@ -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