feat(proxy): support external TLS termination

This commit is contained in:
2026-08-05 00:09:30 +00:00
parent a08bc60496
commit 163f408873
5 changed files with 33 additions and 1 deletions
+12
View File
@@ -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' }),