mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 02:24:11 -05:00
fix(nginx): restrict realtime websocket location to /app/
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user