fix(deploy): ramiel's own names redirected to HTTPS by hand behind HAProxy (ADR 0039)
With https_port 8443, Caddy's automatic HTTP-to-HTTPS redirects would send visitors of code.halkyon.app, halkyon.app and learn.halkyon.app to :8443, which is closed from outside. A site of their own on http:// redirects them to the default port instead. The README's step for home's key points at the host's step 5, and checks that 8443 stays closed and the redirect carries no port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
c8d67b1eb7
commit
fb5eda87e9
1 changed files with 32 additions and 3 deletions
|
|
@ -87,6 +87,24 @@ void main() {
|
|||
expect(caddy, contains('redir https://{host}{uri} 308'));
|
||||
expect(caddy, isNot(contains('reverse_proxy')));
|
||||
});
|
||||
|
||||
test("redirects its own names to HTTPS by hand, so Caddy's automatic "
|
||||
'redirects never point at 8443', () {
|
||||
expect(
|
||||
caddy,
|
||||
contains(
|
||||
'http://code.halkyon.app, http://halkyon.app, '
|
||||
'http://learn.halkyon.app {',
|
||||
),
|
||||
);
|
||||
expect(
|
||||
RegExp(
|
||||
r'^\s*redir (\S+)',
|
||||
multiLine: true,
|
||||
).allMatches(caddy).map((match) => match[1]),
|
||||
everyElement('https://{host}{uri}'),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
group("ramiel's end of the tunnel (D8, D9)", () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue