From d8e2c4ac3ea9e5c4f4ebed33a6109be5e0d08203 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 3 Nov 2023 00:04:13 -0600 Subject: [PATCH] docs: Fix caddyfile snippet in profiling article --- src/docs/markdown/profiling.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docs/markdown/profiling.md b/src/docs/markdown/profiling.md index 235988c..b98e3b8 100644 --- a/src/docs/markdown/profiling.md +++ b/src/docs/markdown/profiling.md @@ -98,7 +98,9 @@ By default, Caddy's admin API is only accessible over the loopback socket. Howev One easy option is to simply reverse proxy to it from your site: ```caddy-d -reverse_proxy /debug/pprof/* localhost:2019 +reverse_proxy /debug/pprof/* localhost:2019 { + header_up Host {upstream_hostport} +} ``` This will, of course, make profiles available to who can connect to your site. If that's not desired, you can add some authentication using an HTTP auth module of your choice.