From 8860b981e61e9504169d7227233bc347c2224ed3 Mon Sep 17 00:00:00 2001 From: mikestefanello Date: Thu, 23 Dec 2021 19:29:12 -0500 Subject: [PATCH] Support CSRF in HTMX non-form posts. --- templates/components/{head.gohtml => core.gohtml} | 10 ++++++++++ templates/layouts/auth.gohtml | 2 ++ templates/layouts/main.gohtml | 2 ++ 3 files changed, 14 insertions(+) rename templates/components/{head.gohtml => core.gohtml} (76%) diff --git a/templates/components/head.gohtml b/templates/components/core.gohtml similarity index 76% rename from templates/components/head.gohtml rename to templates/components/core.gohtml index af80dd8..4d6aeeb 100644 --- a/templates/components/head.gohtml +++ b/templates/components/core.gohtml @@ -19,4 +19,14 @@ {{define "js"}} +{{end}} + +{{define "footer"}} + {{- if .CSRF}} + + {{end}} {{end}} \ No newline at end of file diff --git a/templates/layouts/auth.gohtml b/templates/layouts/auth.gohtml index eeb2dd4..6b78cd5 100644 --- a/templates/layouts/auth.gohtml +++ b/templates/layouts/auth.gohtml @@ -23,5 +23,7 @@ + + {{template "footer"}} \ No newline at end of file diff --git a/templates/layouts/main.gohtml b/templates/layouts/main.gohtml index c153ce8..22a9b61 100644 --- a/templates/layouts/main.gohtml +++ b/templates/layouts/main.gohtml @@ -38,5 +38,7 @@ + + {{template "footer"}} \ No newline at end of file