From 4f526f4dbd3654c30e166e4b325ca51e622dea6c Mon Sep 17 00:00:00 2001 From: Akis Date: Fri, 29 Jul 2022 15:41:45 +0300 Subject: [PATCH] fixes --- main.go | 3 +++ static/form.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 1b4c4d5..e567461 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,7 @@ import ( type StaticThingy struct { Port string + HCaptchaSiteKey string } var port string @@ -22,6 +23,7 @@ func main() { otherthings.CheckEnv() log.Println("[HTTP] Starting server") port := os.Getenv("SEGFAUTILITIES_PORT") + hcaptcha_site_key := os.Getenv("SEGFAUTILITIES_PORT") tmpl := template.Must(template.ParseFiles("static/index.html")) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { data := StaticThingy{ @@ -34,6 +36,7 @@ func main() { http.HandleFunc("/form/", func(w http.ResponseWriter, r *http.Request) { data := StaticThingy{ Port: port, + HCaptchaSiteKey: hcaptcha_site_key, } tmpl_form.Execute(w, data) }) diff --git a/static/form.html b/static/form.html index 66bcc23..ca18499 100644 --- a/static/form.html +++ b/static/form.html @@ -24,7 +24,7 @@
@@ -50,7 +50,7 @@ required placeholder="Your message" > -
+