# HG changeset patch # User Luke Hoersten # Date 1594342636 18000 # Node ID e8d0308b94b265af78397355443bcd482eb5a1b2 # Parent cde9702e3bff4f36869a7de333cf0b886decb170 Added local pleroma prometheus scraping. diff -r cde9702e3bff -r e8d0308b94b2 pleroma/otp/templates/config.exs.j2 --- a/pleroma/otp/templates/config.exs.j2 Thu Jul 09 18:49:48 2020 -0500 +++ b/pleroma/otp/templates/config.exs.j2 Thu Jul 09 19:57:16 2020 -0500 @@ -2,7 +2,7 @@ config :pleroma, Pleroma.Web.Endpoint, url: [host: "{{pleroma_link_host}}", scheme: "{{pleroma_link_scheme}}", port: {{pleroma_link_port}}], - http: [port: {{pleroma_port}}, ip: {127, 0, 0, 1}], + http: [port: {{pleroma_port}}, ip: {0, 0, 0, 0}], secret_key_base: "{{pleroma_secret_key}}", secure_cookie_flag: true @@ -30,7 +30,6 @@ config :pleroma, :media_proxy, enabled: true, redirect_on_failure: true - #base_url: "https://cache.pleroma.social" config :pleroma, Pleroma.Repo, adapter: Ecto.Adapters.Postgres, diff -r cde9702e3bff -r e8d0308b94b2 pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2 --- a/pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2 Thu Jul 09 18:49:48 2020 -0500 +++ b/pleroma/otp/templates/pleroma.cloudflare.index.nginx.conf.j2 Thu Jul 09 19:57:16 2020 -0500 @@ -72,4 +72,9 @@ proxy_ignore_client_abort on; proxy_pass {{pleroma_proxy_pass}}; } + + # don't expose prometheus stats publicly + location /api/pleroma/app_metrics { + return 404; + } } diff -r cde9702e3bff -r e8d0308b94b2 pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2 --- a/pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2 Thu Jul 09 18:49:48 2020 -0500 +++ b/pleroma/otp/templates/pleroma.cloudflare.nginx.conf.j2 Thu Jul 09 19:57:16 2020 -0500 @@ -64,4 +64,9 @@ proxy_ignore_client_abort on; proxy_pass {{pleroma_proxy_pass}}; } + + # don't expose prometheus stats publicly + location /api/pleroma/app_metrics { + return 404; + } } diff -r cde9702e3bff -r e8d0308b94b2 pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2 --- a/pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2 Thu Jul 09 18:49:48 2020 -0500 +++ b/pleroma/otp/templates/pleroma.letsencrypt.nginx.conf.j2 Thu Jul 09 19:57:16 2020 -0500 @@ -69,4 +69,9 @@ proxy_ignore_client_abort on; proxy_pass {{pleroma_proxy_pass}}; } + + # don't expose prometheus stats publicly + location /api/pleroma/app_metrics { + return 404; + } }