openvibers/openvibe.run Commits
Run: nginx refuses /internal/ and /metrics case-insensitively (#12)
Changes
@@@ -87,7 +87,7 @@ server {# ── The job stream: Server-Sent Events ──────────────────# The ticket rides in ?ticket= (a browser cannot put a header on an EventSource), and a reconnect# resumes with Last-Event-ID, which is forwarded verbatim.-- location ~ ^/api/v1/jobs/job_[0-9A-HJKMNP-TV-Z]{26}/stream$ {++ location ~ "^/api/v1/jobs/job_[0-9A-HJKMNP-TV-Z]{26}/stream$" {limit_req zone=ovrun_stream burst=10 nodelay;limit_req_status 429;proxy_pass http://127.0.0.1:4920;@@@ -109,10 +109,10 @@ server {# ── Prometheus metrics: host-local scrapers only (http://127.0.0.1:4920/metrics) ──# The app refuses a request that arrived through a proxy; the vhost refuses it at the edge too.-- location = /metrics { return 404; }++ location ~* ^/metrics(/|$) { return 404; }# ── Host-local service endpoints (Events deliveries, other services on this host) ──-- location /internal/ { return 404; }++ location ~* ^/internal(/|$) { return 404; }# ── The job API ─────────────────────────────────────────location /api/ {
@@ -87,7 +87,7 @@ server {
@@ -87,7 +87,7 @@ server {
# ── The job stream: Server-Sent Events ──────────────────
# ── The job stream: Server-Sent Events ──────────────────
# The ticket rides in ?ticket= (a browser cannot put a header on an EventSource), and a reconnect
# The ticket rides in ?ticket= (a browser cannot put a header on an EventSource), and a reconnect
# resumes with Last-Event-ID, which is forwarded verbatim.
# resumes with Last-Event-ID, which is forwarded verbatim.
- location ~ ^/api/v1/jobs/job_[0-9A-HJKMNP-TV-Z]{26}/stream$ {
+ location ~ "^/api/v1/jobs/job_[0-9A-HJKMNP-TV-Z]{26}/stream$" {
limit_req zone=ovrun_stream burst=10 nodelay;
limit_req zone=ovrun_stream burst=10 nodelay;
limit_req_status 429;
limit_req_status 429;
proxy_pass http://127.0.0.1:4920;
proxy_pass http://127.0.0.1:4920;
@@ -109,10 +109,10 @@ server {
@@ -109,10 +109,10 @@ server {
# ── Prometheus metrics: host-local scrapers only (http://127.0.0.1:4920/metrics) ──
# ── Prometheus metrics: host-local scrapers only (http://127.0.0.1:4920/metrics) ──
# The app refuses a request that arrived through a proxy; the vhost refuses it at the edge too.
# The app refuses a request that arrived through a proxy; the vhost refuses it at the edge too.
- location = /metrics { return 404; }
+ location ~* ^/metrics(/|$) { return 404; }
# ── Host-local service endpoints (Events deliveries, other services on this host) ──
# ── Host-local service endpoints (Events deliveries, other services on this host) ──
- location /internal/ { return 404; }
+ location ~* ^/internal(/|$) { return 404; }
# ── The job API ─────────────────────────────────────────
# ── The job API ─────────────────────────────────────────
location /api/ {
location /api/ {