mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-14 20:48:44 +00:00
perf: embed challenge data in HTML (#279)
This commit is contained in:
@@ -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) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -56,6 +56,9 @@ templ base(title string, body templ.Component, ogTags map[string]string) {
|
||||
}
|
||||
</style>
|
||||
@templ.JSONScript("anubis_version", anubis.Version)
|
||||
if challenge != nil {
|
||||
@templ.JSONScript("anubis_challenge", challenge)
|
||||
}
|
||||
|
||||
</head>
|
||||
<body id="top">
|
||||
|
||||
Reference in New Issue
Block a user