docs: Fix caddyfile snippet in profiling article

This commit is contained in:
Matthew Holt 2023-11-03 00:04:13 -06:00
parent 904071881b
commit d8e2c4ac3e
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -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: One easy option is to simply reverse proxy to it from your site:
```caddy-d ```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. 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.