diff --git a/main.go b/main.go index 1b01b67..105f9ac 100644 --- a/main.go +++ b/main.go @@ -51,6 +51,10 @@ func mainHandler(c *gin.Context) { c.Set("ua", c.Req.UserAgent()) c.Set("lang", c.Req.Header.Get("Accept-Language")) c.Set("encoding", c.Req.Header.Get("Accept-Encoding")) + c.Set("method", c.Req.Method) + c.Set("mime", c.Req.Header.Get("Accept")) + c.Set("referer", c.Req.Header.Get("Referer")) + c.Set("forwarded", c.Req.Header.Get("X-Forwarded-For")) hostnames, err := net.LookupAddr(ip.IP.String()) if err != nil { diff --git a/templates/index.html b/templates/index.html index fe1ae49..5df51b4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -90,7 +90,7 @@ Encoding{{ .encoding }} - MIME Type{{ .mime_type }} + MIME Type{{ .mime }} Charset{{ .charset }} @@ -99,7 +99,7 @@ Via{{ .via }} - X-Forwarded-For{{ .x_forwarded_for }} + X-Forwarded-For{{ .forwarded }} @@ -139,7 +139,7 @@ $ curl ifconfig.io/encoding{{ .encoding }} - $ curl ifconfig.io/mime{{ .mime_type }} + $ curl ifconfig.io/mime{{ .mime }} $ curl ifconfig.io/charset{{ .charset }} @@ -148,7 +148,7 @@ $ curl ifconfig.io/via{{ .via }} - $ curl ifconfig.io/forwarded{{ .x_forwarded_for }} + $ curl ifconfig.io/forwarded{{ .forwarded }} $ curl ifconfig.io/all{{ .hash_as_yaml }}