Accept 16-character subscription secrets for gateway presence
This commit is contained in:
@@ -52,6 +52,13 @@ test('Gateway presence is authenticated by the shared subscription secret', asyn
|
||||
nonce,
|
||||
}).available, false);
|
||||
|
||||
assert.equal(buildGatewayPresence({
|
||||
appMode: 'gateway',
|
||||
subscriptionUrl: 'https://subscription.example/0123456789abcdef',
|
||||
gatewayId: 'gateway-1',
|
||||
nonce,
|
||||
}).available, true);
|
||||
|
||||
const sharedPublicValue = 'https://public.example/sing-box-configuration-v1';
|
||||
const firstUrl = `${subscriptionUrl}?redirect=${encodeURIComponent(sharedPublicValue)}`;
|
||||
const secondUrl = `https://subscription.example/fedcba9876543210fedcba9876543210?redirect=${encodeURIComponent(sharedPublicValue)}`;
|
||||
|
||||
Reference in New Issue
Block a user