- removed all ability to provide your cid to the server through params, cid is gained from JWT claims - improved verification of who owns a cid, which includes locking a cid to a uid - locks and persisting entries of broadcasting are cleaned up on disconnection - method identification logic was rewritten to fit these changes
30 lines
924 B
C#
30 lines
924 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace LightlessSyncServer.Configuration;
|
|
|
|
public class BroadcastOptions
|
|
{
|
|
[Required]
|
|
public string RedisKeyPrefix { get; set; } = "broadcast:";
|
|
|
|
[Range(1, int.MaxValue)]
|
|
public int EntryTtlSeconds { get; set; } = 10800;
|
|
|
|
[Range(1, int.MaxValue)]
|
|
public int MaxStatusBatchSize { get; set; } = 30;
|
|
|
|
public bool NotifyOwnerOnPairRequest { get; set; } = true;
|
|
|
|
public bool EnableBroadcasting { get; set; } = true;
|
|
|
|
public bool EnableSyncshellBroadcastPayloads { get; set; } = true;
|
|
|
|
public string PairRequestNotificationTemplate { get; set; } = "{DisplayName} sent you a pair request. To accept, right-click them, open the context menu, and send a request back.";
|
|
|
|
[Range(1, int.MaxValue)]
|
|
public int PairRequestRateLimit { get; set; } = 5;
|
|
|
|
[Range(1, int.MaxValue)]
|
|
public int PairRequestRateWindow { get; set; } = 60;
|
|
}
|