Last updated 8 months ago
In Caddy Server, we can use to return Client IP Address as plain text, using .RemoteIP, Caddyfile example is given below -
.RemoteIP
Caddyfile:
example.com { templates header Content-Type text/plain respond "Hello from IPv6, your IPv6 is -> {{.RemoteIP}}" encode zstd gzip }
Source: