mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-10 17:45:42 +00:00
8730d9b083
LAN/IP bundles can use plaintext HTTP/WS like RustDesk while session crypto stays on the protocol layer; enrollment no longer treats a second same-request proof check as a nonce replay.
27 lines
881 B
JavaScript
27 lines
881 B
JavaScript
'use strict';
|
|
|
|
const bundleService = require('../services/agentBundleService');
|
|
|
|
describe('Support Agent bundle transport policy', () => {
|
|
const baseBranding = {
|
|
company_name: 'Example Support',
|
|
server_host: 'desk.example.test',
|
|
};
|
|
|
|
it('defaults generated Support Agent profiles to HTTPS', () => {
|
|
const result = bundleService.validateBranding(baseBranding);
|
|
expect(result.valid).toBe(true);
|
|
expect(result.normalized.use_https).toBe(true);
|
|
});
|
|
|
|
it('allows HTTP/WS transport for LAN deployments (RustDesk-style)', () => {
|
|
const result = bundleService.validateBranding({
|
|
...baseBranding,
|
|
use_https: false,
|
|
});
|
|
expect(result.valid).toBe(true);
|
|
expect(result.errors).not.toContain('https_required');
|
|
expect(result.normalized.use_https).toBe(false);
|
|
});
|
|
});
|