From f844dba3dcfc0c51bcc72bfe9707ceec0c09b7ed Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Fri, 18 Apr 2025 04:06:37 +0000 Subject: perf: embed challenge data in HTML (#279) --- web/index.templ | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/index.templ') diff --git a/web/index.templ b/web/index.templ index 01d12b6..4eb1d45 100644 --- a/web/index.templ +++ b/web/index.templ @@ -5,7 +5,7 @@ import ( "github.com/TecharoHQ/anubis/xess" ) -templ base(title string, body templ.Component, ogTags map[string]string) { +templ base(title string, body templ.Component, challenge any, ogTags map[string]string) { @@ -56,6 +56,9 @@ templ base(title string, body templ.Component, ogTags map[string]string) { } @templ.JSONScript("anubis_version", anubis.Version) + if challenge != nil { + @templ.JSONScript("anubis_challenge", challenge) + } -- cgit v1.2.3