diff options
author | Thatcher <thatcher@peskens.nl> | 2020-12-14 21:02:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 21:02:35 +0300 |
commit | ab8f90431be7174e95251b53662afb8cc1732fdc (patch) | |
tree | 0dedc9940f52cc2b4fb867527b2700208799662c /cmd | |
parent | 762f4548650f02b18962ba87ae17ad3dd88a6d95 (diff) |
New template (#121)
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/echoip/main.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/echoip/main.go b/cmd/echoip/main.go index ecd1e7a..737a4f4 100644 --- a/cmd/echoip/main.go +++ b/cmd/echoip/main.go @@ -41,9 +41,10 @@ func main() { listen := flag.String("l", ":8080", "Listening address") reverseLookup := flag.Bool("r", false, "Perform reverse hostname lookups") portLookup := flag.Bool("p", false, "Enable port lookup") - template := flag.String("t", "index.html", "Path to template") + template := flag.String("t", "html", "Path to template dir") cacheSize := flag.Int("C", 0, "Size of response cache. Set to 0 to disable") profile := flag.Bool("P", false, "Enables profiling handlers") + sponsor := flag.Bool("s", false, "Show sponsor logo") var headers multiValueFlag flag.Var(&headers, "H", "Header to trust for remote IP, if present (e.g. X-Real-IP)") flag.Parse() @@ -72,6 +73,10 @@ func main() { log.Println("Enabling port lookup") server.LookupPort = iputil.LookupPort } + if *sponsor { + log.Println("Enabling sponsor logo") + server.Sponsor = *sponsor + } if len(headers) > 0 { log.Printf("Trusting remote IP from header(s): %s", headers.String()) } |