From baad75737135eced6f33fecc1c4104f70719c0ce Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 21 Apr 2024 22:52:21 +0200 Subject: Finish the big cleanup --- utils/htmx.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 utils/htmx.go (limited to 'utils/htmx.go') diff --git a/utils/htmx.go b/utils/htmx.go new file mode 100644 index 0000000..3cdd35e --- /dev/null +++ b/utils/htmx.go @@ -0,0 +1,9 @@ +package utils + +import ( + "net/http" +) + +func HtmxRedirect(w http.ResponseWriter, url string) { + w.Header().Add("HX-Redirect", "/") +} -- cgit