summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/tplcontext.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/templates/tplcontext.go')
-rw-r--r--modules/caddyhttp/templates/tplcontext.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go
index d89f106..19bf714 100644
--- a/modules/caddyhttp/templates/tplcontext.go
+++ b/modules/caddyhttp/templates/tplcontext.go
@@ -120,7 +120,7 @@ func (c templateContext) Cookie(name string) string {
// Hostname gets the (remote) hostname of the client making the request.
// Performance warning: This involves a DNS lookup.
func (c templateContext) Hostname() string {
- ip := c.IP()
+ ip := c.RemoteIP()
hostnameList, err := net.LookupAddr(ip)
if err != nil || len(hostnameList) == 0 {