diff --git a/roles/any.software.forgejo-podman/templates/app.ini.j2 b/roles/any.software.forgejo-podman/templates/app.ini.j2 index 3643eb0..8fd8c80 100644 --- a/roles/any.software.forgejo-podman/templates/app.ini.j2 +++ b/roles/any.software.forgejo-podman/templates/app.ini.j2 @@ -123,4 +123,4 @@ ENABLED = true SCHEDULE = @weekly [metrics] -enabled = true +ENABLED = true diff --git a/roles/any.software.forgejo-podman/templates/forgejo.Caddyfile.j2 b/roles/any.software.forgejo-podman/templates/forgejo.Caddyfile.j2 index 39a4f48..f5468dc 100644 --- a/roles/any.software.forgejo-podman/templates/forgejo.Caddyfile.j2 +++ b/roles/any.software.forgejo-podman/templates/forgejo.Caddyfile.j2 @@ -2,4 +2,18 @@ reverse_proxy localhost:{{ forgejo_http_port }} { header_down +X-Robots-Tag "none" } + + route /metrics { + @local { + remote_ip 127.0.0.1 ::1 + } + + handle @local { + reverse_proxy localhost:{{ forgejo_http_port }} + } + + handle { + respond "Not Found" 404 + } + } } diff --git a/roles/any.software.gitea/templates/app.ini.j2 b/roles/any.software.gitea/templates/app.ini.j2 index 4653ec3..48c5698 100644 --- a/roles/any.software.gitea/templates/app.ini.j2 +++ b/roles/any.software.gitea/templates/app.ini.j2 @@ -110,3 +110,6 @@ JWT_SECRET = {{ gitea_jwt_secret }} [other] SHOW_FOOTER_VERSION = false SHOW_FOOTER_TEMPLATE_LOAD_TIME = false + +[metrics] +enabled = true