Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dev2/edge/edge.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
],
"keep_on_nginx": {
"//": "Names under a routed pattern that stay on nginx for now, with why.",
"live.streaming.pit.world": "per-path routing to two nixamp servers with a 404 fallback (error_page @server2); move after it has its own Caddy rehearsal",
"otr.podcast.pit.world": "the new OTR Caddy site changes this legacy pit.world alias from 200 to 301; preserve the current nginx response until the alias is rehearsed"
"live.streaming.pit.world": "per-path routing to two nixamp servers with a 404 fallback (error_page @server2); move after it has its own Caddy rehearsal"
},
"sites": [
{ "hosts": ["pit.world"], "proxy": 8787, "max_body": "1MiB" },
{ "hosts": ["www.pit.world"], "redirect": "https://pit.world{uri}" },
{ "hosts": ["ad.network.pit.world"], "proxy": 8800, "max_body": "1MiB", "gzip": true },
{ "hosts": ["agent.database.pit.world"], "proxy": 18080, "max_body": "512KiB", "gzip": true, "access_log": true, "sanitize_query": true },
{ "hosts": ["otr.podcast.pit.world"], "proxy": 8787, "max_body": "30MiB", "gzip": true,
"//": "preserve the legacy pit.world alias route while the exact OTR host uses port 8814" },
{ "hosts": ["group.call.pit.world"], "proxy": 8810, "max_body": "1MiB", "retry": "20s",
"//": "group.call (moshcoder/group.call): no gzip, so the room page's server-sent events are not held back; retry holds Telnyx webhooks across a deploy instead of 502" },
{ "hosts": ["*.*.pit.world", "*.*.*.pit.world"], "proxy": 8787, "max_body": "30MiB", "gzip": true,
Expand Down
4 changes: 3 additions & 1 deletion test/dev2-edge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('dev2-edge render', () => {
expect(stream).toMatch(/\n\s+chovy\.hacker\s+127\.0\.0\.1:8453;/);
// an exact name under a routed wildcard can stay on nginx
expect(stream).toMatch(/\n\s+live\.streaming\.pit\.world\s+127\.0\.0\.1:8444;/);
expect(stream).toMatch(/\n\s+otr\.podcast\.pit\.world\s+127\.0\.0\.1:8444;/);
expect(stream).toMatch(/\n\s+otr\.podcast\.pit\.world\s+127\.0\.0\.1:8453;/);
expect(stream).toContain('hostnames;');
});

Expand All @@ -154,6 +154,8 @@ describe('dev2-edge render', () => {
expect(caddy).toContain('protocols h1 h2');
expect(caddy).not.toMatch(/on_demand|acme_ca|\bemail\b/);
expect(caddy).toContain('header_up X-Real-IP {remote_host}');
const otrAlias = caddy.slice(caddy.indexOf('https://otr.podcast.pit.world {'));
expect(otrAlias).toContain('import edge_proxy 8787');
for (const site of SPEC.sites) {
const head = site.hosts.map((h: string) => `https://${h}`).join(', ') + ' {';
expect(caddy).toContain(head);
Expand Down
Loading