fix(nginx): restrict realtime websocket location to /app/

This commit is contained in:
Andras Bacsai
2026-08-22 13:33:51 +02:00
parent 95262d0b66
commit 3654f815bc
3 changed files with 3 additions and 3 deletions
@@ -30,7 +30,7 @@ location /healthcheck {
}
# Proxy Coolify's websocket services through the same endpoint as the dashboard.
location ^~ /app {
location ^~ /app/ {
proxy_pass http://coolify-realtime:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@@ -30,7 +30,7 @@ location /healthcheck {
}
# Proxy Coolify's websocket services through the same endpoint as the dashboard.
location ^~ /app {
location ^~ /app/ {
proxy_pass http://coolify-realtime:6001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@@ -2,7 +2,7 @@
it('proxies realtime websocket traffic through the bundled nginx server', function (string $environment) {
$nginxConfiguration = file_get_contents(base_path("docker/{$environment}/etc/nginx/site-opts.d/http.conf"));
$locationFound = preg_match('/location \^~ \/app \{(?<body>.*?)\n\}/s', $nginxConfiguration, $location);
$locationFound = preg_match('/location \^~ \/app\/ \{(?<body>.*?)\n\}/s', $nginxConfiguration, $location);
expect($locationFound)
->toBe(1)