challenge/resource-load: use proper redirect URL to current issued challenge, add static/dynamic cache bust

This commit is contained in:
WeebDataHoarder
2025-05-13 23:43:31 +02:00
parent 3abdc2ee5b
commit 163fce6cfc
6 changed files with 25 additions and 15 deletions

View File

@@ -23,6 +23,7 @@ func ServeChallengeScript(w http.ResponseWriter, r *http.Request, reg *Registrat
//TODO: log
panic(err)
}
data.ResponseHeaders(w)
w.WriteHeader(http.StatusOK)
@@ -30,7 +31,7 @@ func ServeChallengeScript(w http.ResponseWriter, r *http.Request, reg *Registrat
"Id": data.Id.String(),
"Path": reg.Path,
"Parameters": paramData,
"Random": utils.CacheBust(),
"Random": utils.StaticCacheBust(),
"Challenge": reg.Name,
"ChallengeScript": script,
"Strings": data.State.Strings(),