perf: embed challenge data in HTML (#279)
This commit is contained in:
parent
736c3ade09
commit
f844dba3dc
7 changed files with 63 additions and 42 deletions
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue