From ef915583aa7d9389ee3910dc3d77c3d72c8ef6e9 Mon Sep 17 00:00:00 2001 From: Mans Ziesel Date: Mon, 3 Jun 2024 14:15:07 +0200 Subject: [PATCH] change html template --- main.go | 2 +- templates/index.html | 53 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 202fb2a..4e85fe1 100644 --- a/main.go +++ b/main.go @@ -99,7 +99,7 @@ func mainHandler(w http.ResponseWriter, r *http.Request) { return } case "/raw": - fmt.Fprintf(w, "%s\n%s\n", netAddr.Address, netAddr.Type) + fmt.Fprintf(w, "%s\n", netAddr.Address) case "/json": responseJSON(w, netAddr) default: diff --git a/templates/index.html b/templates/index.html index ab25390..d4070cc 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,10 +4,50 @@ My IP + - IP: {{ .Address }}
- IP: {{ .Type}}
+