openvibers/openvibe.search Commits

Vhost: proxy POST /release-metrics (open tabs' release reports were a 404 on search.openvibe.network) (#73)

OP OpenVibers committed 27 days ago · 9a161c7790 · 2 files, +4 −0

Changes

ddiff --git a/deploy/nginx/search.openvibe.network.conf b/deploy/nginx/search.openvibe.network.conf
iindex 7fc7a92..dcabfe2 100644
---- a/deploy/nginx/search.openvibe.network.conf
++++ b/deploy/nginx/search.openvibe.network.conf
@@@ -72,6 +72,9 @@ server {
location = /api/health { proxy_pass http://127.0.0.1:4710; }
location = /api/ready { proxy_pass http://127.0.0.1:4710; }
location = /release.json { proxy_pass http://127.0.0.1:4710; }
++ # Open tabs report "a newer release took over" here (openvibe-shared release-watch, POST text/plain): it was not
++ # proxied, so every report from search.openvibe.network was a 404 (2026-10-17).
++ location = /release-metrics { limit_except POST { deny all; } client_max_body_size 4k; proxy_pass http://127.0.0.1:4710; }
# Metrics are for host-local scrapers only (http://127.0.0.1:4710/metrics).
location ~* ^/metrics(/|$) { return 404; }
ddiff --git a/test/vhost.test.js b/test/vhost.test.js
iindex 9ea6276..232757a 100644
---- a/test/vhost.test.js
++++ b/test/vhost.test.js
@@@ -28,6 +28,7 @@ t('wildcard certificate and client address from $remote_addr only', () => {
t('/metrics is 404; owner API, webhook and document writes are loopback-only', () => {
assert.match(conf, /location ~\* \^\/metrics\(\/\|\$\) \{ return 404; \}/, '/metrics in any letter case');
assert.match(block('location = /updates'), /limit_except GET \{ deny all; \}/, 'the update log, GET only');
++ assert.match(conf, /location = \/release-metrics \{ limit_except POST \{ deny all; \} client_max_body_size 4k; proxy_pass http:\/\/127\.0\.0\.1:4710; \}/, 'open tabs\' release reports reach the app (POST only, small)');
assert.match(conf, /location \^~ \/shared\/ \{ limit_except GET \{ deny all; \} proxy_pass http:\/\/127\.0\.0\.1:4710; \}/, 'the site\'s own Frame files');
assert.match(block('location ^~ /internal/'), loopbackOnly);
assert.match(block('location ^~ /api/v1/owners/'), loopbackOnly);