feat(proxy): support external TLS termination
This commit is contained in:
@@ -20,6 +20,18 @@ test('accepts a complete public repository environment', () => {
|
||||
assert.deepEqual(validateEnvironment(validEnv), []);
|
||||
});
|
||||
|
||||
test('accepts an HTTP Caddy address for external TLS termination', () => {
|
||||
assert.deepEqual(
|
||||
validateEnvironment({ ...validEnv, CADDY_SITE_ADDRESS: 'http://game.test.invalid' }),
|
||||
[],
|
||||
);
|
||||
});
|
||||
|
||||
test('rejects a Caddy address for a different host', () => {
|
||||
const errors = validateEnvironment({ ...validEnv, CADDY_SITE_ADDRESS: 'http://other.test.invalid' });
|
||||
assert.ok(errors.some((error) => error.includes('CADDY_SITE_ADDRESS')));
|
||||
});
|
||||
|
||||
test('accepts paired HTTPS credentials without embedding them in the URL', () => {
|
||||
assert.deepEqual(
|
||||
validateEnvironment({ ...validEnv, CORE_REPOSITORY_USERNAME: 'deploy', CORE_REPOSITORY_TOKEN: 'token' }),
|
||||
|
||||
Reference in New Issue
Block a user