Add HOSTNAME Env Variable

The HOSTNAME Env Variable adapts the HTML template to the current hostname.

This is by default `ifconfig.io`
This commit is contained in:
Malte Reddig
2020-10-05 13:36:27 +02:00
committed by George Shammas
parent bdc30bf2c7
commit e9feea4898
2 changed files with 17 additions and 15 deletions

View File

@@ -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())