mirror of
https://github.com/mpolden/echoip.git
synced 2025-01-27 02:15:01 +01:00
parent
e5c8310acb
commit
cba0928a65
14
http/http.go
14
http/http.go
@ -222,12 +222,20 @@ func (s *Server) DefaultHandler(w http.ResponseWriter, r *http.Request) *appErro
|
|||||||
}
|
}
|
||||||
var data = struct {
|
var data = struct {
|
||||||
Response
|
Response
|
||||||
Host string
|
Host string
|
||||||
JSON string
|
BoxLatTop float64
|
||||||
Port bool
|
BoxLatBottom float64
|
||||||
|
BoxLonLeft float64
|
||||||
|
BoxLonRight float64
|
||||||
|
JSON string
|
||||||
|
Port bool
|
||||||
}{
|
}{
|
||||||
response,
|
response,
|
||||||
r.Host,
|
r.Host,
|
||||||
|
response.Latitude + 0.05,
|
||||||
|
response.Latitude - 0.05,
|
||||||
|
response.Longitude - 0.05,
|
||||||
|
response.Longitude + 0.05,
|
||||||
string(json),
|
string(json),
|
||||||
s.LookupPort != nil,
|
s.LookupPort != nil,
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,12 @@ $ http {{ .Host }}/port/8080
|
|||||||
}</pre>
|
}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ if .City }}
|
||||||
|
<div class="pure-u-1 pure-u-md-1-1">
|
||||||
|
<h2>Map</h2>
|
||||||
|
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox={{ .BoxLonLeft }}%2C{{ .BoxLatBottom }}%2C{{ .BoxLonRight }}%2C{{ .BoxLatTop }}&layer=mapnik&marker={{ .Latitude }}%2C{{ .Longitude }}"></iframe>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>FAQ</h2>
|
<h2>FAQ</h2>
|
||||||
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user