initial commit before refactor switch
This commit is contained in:
55
server/tpl/meta.info.html.tpl
Normal file
55
server/tpl/meta.info.html.tpl
Normal file
@@ -0,0 +1,55 @@
|
||||
{{- /*gotype: r00t2.io/clientinfo/server.Page*/ -}}
|
||||
{{- define "meta.info" -}}
|
||||
{{- $page := . -}}
|
||||
{{- $linkico := "🔗" }}
|
||||
<h2 id="client">Client/Browser Information<a href="#client">{{ $linkico }}</a></h2>
|
||||
<p>
|
||||
<b>Your IP Address is <i><a href="https://ipinfo.io/{{ $page.Info.IP.String }}">{{ $page.Info.IP.String }}</a></i>.</b>
|
||||
<br/>
|
||||
<i>You are connecting with port <b>{{ $page.Info.Port }}</b> outbound.</i>
|
||||
</p>
|
||||
{{- if $page.Raw }}
|
||||
<h3 id="client_raw">Raw Block ({{ $page.RawFmt }})<a href="#client_raw">{{ $linkico }}</a></h3>
|
||||
<p>
|
||||
{{- if $page.DoRawIndent }}
|
||||
<pre>{{ $page.Raw }}</pre>
|
||||
{{- else }}
|
||||
<code>{{ $page.Raw }}</code>
|
||||
{{- end }}
|
||||
</p>
|
||||
{{- end }}
|
||||
<h3 id="client_ua">User Agent Information<a href="#client_ua">{{ $linkico }}</a></h3>
|
||||
<p>This is information that your browser sends to identify itself.</p>
|
||||
<p>
|
||||
{{- range $idx, $ua := $page.Info.Client }}
|
||||
User Agent ({{ $idx }}):
|
||||
<ul>
|
||||
{{- $flds := $ua.ToMap }}
|
||||
{{- range $fld, $str := $flds }}
|
||||
<li><b>{{ $fld }}:</b> {{ $str }}</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
</p>
|
||||
<h3 id="client_hdrs">Request Headers<a href="#client_hdrs">{{ $linkico }}</a></h3>
|
||||
<p>
|
||||
These are headers sent along with the request your browser sends for the page's content.
|
||||
Note that some headers may have multiple values.
|
||||
</p>
|
||||
<p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Header</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
{{- range $hdrNm, $hdrVals := $page.Info.Req.Header }}
|
||||
<tr>
|
||||
{{- range $val := $hdrVals }}
|
||||
<td>{{ $hdrNm }}</td>
|
||||
<td>{{ $val }}</td>
|
||||
{{- end }}
|
||||
</tr>
|
||||
{{- end }}
|
||||
</table>
|
||||
</p>
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user