Block external access to /metrics endpoint by regex replace

This commit is contained in:
Tobias Manske 2023-04-09 22:10:16 +02:00
parent 37fe8a51d9
commit 6c182e8409
Signed by: tobias
GPG Key ID: 9164B527694A0709
2 changed files with 6 additions and 0 deletions

View File

@ -26,3 +26,7 @@ http:
middlewares:
- oauth-errors
- oauth-auth
deny-metrics:
replacePathRegex:
regex: "^/metrics$"
replacement: "/"

View File

@ -20,6 +20,8 @@ entryPoints:
http:
tls:
certResolver: letsencrypt
middlewares:
- deny-metrics@file
certificatesResolvers:
letsencrypt: