mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-17 06:23:32 +02:00
Add support for city lookup
This commit is contained in:
10
index.html
10
index.html
@ -66,6 +66,13 @@ $ fetch -qo- http://ifconfig.co
|
||||
$ http ifconfig.co/country
|
||||
{{ .Country }}
|
||||
</pre>
|
||||
{{ end }}
|
||||
{{ if .IsLookupCityEnabled }}
|
||||
<p>City lookup:</p>
|
||||
<pre>
|
||||
$ http ifconfig.co/city
|
||||
{{ .City }}
|
||||
</pre>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pure-u-1 pure-u-md-1-2">
|
||||
@ -78,7 +85,8 @@ Content-Type: application/json
|
||||
Date: Fri, 15 Apr 2016 17:26:53 GMT
|
||||
|
||||
{ {{ if .IsLookupCountryEnabled }}
|
||||
"country": "{{ .Country }}",{{ end }}{{ if .IsLookupAddrEnabled }}
|
||||
"country": "{{ .Country }}",{{ end }}{{ if .IsLookupCityEnabled }}
|
||||
"city": "{{ .City }}",{{ end }}{{ if .IsLookupAddrEnabled }}
|
||||
"hostname": "{{ .Hostname }}",{{ end }}
|
||||
"ip": "{{ .IP }}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user