mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-06 04:51:33 -07:00
restrict access to metrics endpoint in subdomain
https://jellyfin.org/docs/general/networking/monitoring/#prometheus-metrics
This commit is contained in:
parent
3f5dd87518
commit
e923048e76
1 changed files with 18 additions and 0 deletions
|
@ -37,4 +37,22 @@ server {
|
|||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
}
|
||||
|
||||
# Restrict access to /metrics
|
||||
# https://jellyfin.org/docs/general/networking/monitoring/#prometheus-metrics
|
||||
location /jellyfin/metrics {
|
||||
allow 192.168.0.0/16;
|
||||
allow 10.0.0.0/8;
|
||||
allow 172.16.0.0/12
|
||||
allow 127.0.0.0/8;
|
||||
|
||||
deny all;
|
||||
|
||||
include /config/nginx/proxy.conf;
|
||||
include /config/nginx/resolver.conf;
|
||||
set $upstream_app jellyfin;
|
||||
set $upstream_port 8096;
|
||||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue