diff --git a/cmd/zrok/endpoint_ui/index.html b/cmd/zrok/endpoint_ui/index.html index 0057ca68..df3846d1 100644 --- a/cmd/zrok/endpoint_ui/index.html +++ b/cmd/zrok/endpoint_ui/index.html @@ -47,6 +47,8 @@

The Current Now is {{ .Now }}

+

The current HOST header: {{ .Host }}

+

The remote host making the request: {{ .Remote }}

This host has these IP addresses: {{ .Ips }}

diff --git a/cmd/zrok/test.go b/cmd/zrok/test.go index 6db51a4b..a0529e9a 100644 --- a/cmd/zrok/test.go +++ b/cmd/zrok/test.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/opentracing/opentracing-go/log" "github.com/openziti-test-kitchen/zrok/cmd/zrok/endpoint_ui" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" "html/template" "net" @@ -56,8 +57,11 @@ func (cmd *testEndpointCommand) run(_ *cobra.Command, _ []string) { } func (cmd *testEndpointCommand) handleIndex(w http.ResponseWriter, r *http.Request) { + logrus.Infof("%v {%v} -> /index.html", r.RemoteAddr, r.Host) ed := &endpointData{ - Now: time.Now(), + Now: time.Now(), + Host: r.Host, + Remote: r.RemoteAddr, } ed.getIps() if err := cmd.t.Execute(w, ed); err != nil { @@ -66,8 +70,10 @@ func (cmd *testEndpointCommand) handleIndex(w http.ResponseWriter, r *http.Reque } type endpointData struct { - Now time.Time - Ips string + Now time.Time + Host string + Remote string + Ips string } func (ed *endpointData) getIps() {