diff --git a/main.go b/main.go index 60a5d54..f8b16b1 100644 --- a/main.go +++ b/main.go @@ -60,6 +60,8 @@ func mainHandler(c *gin.Context) { // return //} + c.Set("ifconfig_hostname", getEnvWithDefault("HOSTNAME", "ifconfig.io")) + c.Set("ip", ip.IP.String()) c.Set("port", ip.Port) c.Set("ua", c.Request.UserAgent()) diff --git a/templates/index.html b/templates/index.html index 34fc355..328188d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,12 +9,12 @@ /* Customizations. */ li.list-group-item{overflow:auto;padding-top:6px;padding-bottom:6px;}header.page-header{margin-top:20px;}a.h1{color:inherit;text-decoration:none;}@media(max-width: 750px){div.col-sm-3{font-weight:700;}} - ifconfig.io + {{ .ifconfig_hostname }} @@ -65,43 +65,43 @@