fix(proxy): stop routing the Reverb HTTP API through the dashboard domain

The browser uses only the /app/{key} WebSocket. Laravel sends events to
Reverb over 127.0.0.1, so the generated Traefik and Caddy configs no longer
route /apps to port 6001, and the WebSocket rule only matches /app/.

Closes #12390

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-10-30 12:01:21 +01:00
co-authored by Claude Opus 5.5
parent 98b7de0ea7
commit b3ec26c3b1
2 changed files with 7 additions and 21 deletions
+2 -20
View File
@@ -1136,14 +1136,7 @@ class Server extends BaseModel
0 => 'http',
],
'service' => 'coolify-reverb',
'rule' => "Host(`{$host}`) && PathPrefix(`/app`)",
],
'coolify-reverb-api' => [
'entryPoints' => [
0 => 'http',
],
'service' => 'coolify-reverb',
'rule' => "Host(`{$host}`) && PathPrefix(`/apps`)",
'rule' => "Host(`{$host}`) && PathPrefix(`/app/`)",
],
'coolify-terminal-ws' => [
'entryPoints' => [
@@ -1206,15 +1199,7 @@ class Server extends BaseModel
0 => 'https',
],
'service' => 'coolify-reverb',
'rule' => "Host(`{$host}`) && PathPrefix(`/app`)",
'tls' => $tls,
];
$traefik_dynamic_conf['http']['routers']['coolify-reverb-api-https'] = [
'entryPoints' => [
0 => 'https',
],
'service' => 'coolify-reverb',
'rule' => "Host(`{$host}`) && PathPrefix(`/apps`)",
'rule' => "Host(`{$host}`) && PathPrefix(`/app/`)",
'tls' => $tls,
];
$traefik_dynamic_conf['http']['routers']['coolify-terminal-wss'] = [
@@ -1256,9 +1241,6 @@ $siteAddress {
handle /app/* {
reverse_proxy coolify:6001
}
handle /apps* {
reverse_proxy coolify:6001
}
handle /terminal/ws {
reverse_proxy coolify:6002
}
@@ -95,10 +95,14 @@ test('coolify dashboard routes follow the server certificate resolver', function
preg_match("/echo '([A-Za-z0-9+\/=]+)' \| base64 -d/", $command, $matches);
$routers = Yaml::parse(base64_decode($matches[1]))['http']['routers'];
foreach (['coolify-https', 'coolify-reverb-wss', 'coolify-reverb-api-https', 'coolify-terminal-wss'] as $router) {
foreach (['coolify-https', 'coolify-reverb-wss', 'coolify-terminal-wss'] as $router) {
expect($routers[$router])->toHaveKey('tls')
->and($routers[$router]['tls'] ?? [])->toBe($expectedTls);
}
expect($routers)->not->toHaveKeys(['coolify-reverb-api', 'coolify-reverb-api-https'])
->and($routers['coolify-reverb-ws']['rule'])->toBe('Host(`coolify.example.com`) && PathPrefix(`/app/`)')
->and($routers['coolify-reverb-wss']['rule'])->toBe('Host(`coolify.example.com`) && PathPrefix(`/app/`)');
})->with([
'letsencrypt' => ['letsencrypt', ['certresolver' => 'letsencrypt']],
'no resolver' => [null, []],