openvibers/openvibe.wiki Commits

Wiki: nginx refuses /internal/ and /metrics case-insensitively (#24)

OP OpenVibers committed 10 Oct 2026 · 0e56340c8e · 1 file, +2 −2

nginx config only. Express routes case-insensitively, so a case variant such as `/Internal/events` or `/METRICS` slipped past the case-sensitive `location /internal/ { return 404; }` and `location = /metrics { return 404; }` blocks and reached the app. Those paths were still guarded in the app (the Events signature, the loopback check on metrics). Both blocks are now `location ~* ^/internal(/|$)` and `location ~* ^/metrics(/|$)`. The independent security reviews of 2026-10-09/10 found this in several services; this applies it network-wide.

Changes

ddiff --git a/deploy/nginx/openvibe.wiki.conf b/deploy/nginx/openvibe.wiki.conf
iindex b37c22d..b9a3ac7 100644
---- a/deploy/nginx/openvibe.wiki.conf
++++ b/deploy/nginx/openvibe.wiki.conf
@@@ -83,7 +83,7 @@ server {
proxy_cache_bypass 1;
# Prometheus metrics are for the host only (the app also refuses non-loopback callers).
-- location = /metrics { return 404; }
++ location ~* ^/metrics(/|$) { return 404; }
# The session probe: the shared navbar asks it on every page view, so it cannot share the sign-in
# budget below (10 a minute): a visitor reading quickly was answered 503 and looked signed out
@@@ -121,7 +121,7 @@ server {
# ── OpenVibe.Events' delivery route: loopback only (POST /internal/events) ──
# Events posts to http://127.0.0.1:4800/internal/events directly; never proxied from outside (ADR-033).
-- location /internal/ { return 404; }
++ location ~* ^/internal(/|$) { return 404; }
location / {
limit_req zone=ovwiki_write burst=20 nodelay;