More data to return to client
This commit is contained in:
parent
433c9a9e60
commit
7fbc0ab612
4
main.go
4
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 {
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<td>Encoding</td><td>{{ .encoding }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MIME Type</td><td>{{ .mime_type }}</td>
|
||||
<td>MIME Type</td><td>{{ .mime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charset</td><td>{{ .charset }}</td>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<td>Via</td><td>{{ .via }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>X-Forwarded-For</td><td>{{ .x_forwarded_for }}</td>
|
||||
<td>X-Forwarded-For</td><td>{{ .forwarded }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -139,7 +139,7 @@
|
|||
<td>$ curl ifconfig.io/encoding</td><td>{{ .encoding }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$ curl ifconfig.io/mime</td><td>{{ .mime_type }}</td>
|
||||
<td>$ curl ifconfig.io/mime</td><td>{{ .mime }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$ curl ifconfig.io/charset</td><td>{{ .charset }}</td>
|
||||
|
@ -148,7 +148,7 @@
|
|||
<td>$ curl ifconfig.io/via</td><td>{{ .via }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$ curl ifconfig.io/forwarded</td><td>{{ .x_forwarded_for }}</td>
|
||||
<td>$ curl ifconfig.io/forwarded</td><td>{{ .forwarded }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$ curl ifconfig.io/all</td><td>{{ .hash_as_yaml }}</td>
|
||||
|
|
Loading…
Reference in New Issue