Load challenge as style

This commit is contained in:
WeebDataHoarder
2025-04-08 02:38:53 +02:00
parent 2ce9709667
commit f272a5ae72
2 changed files with 5 additions and 1 deletions

View File

@@ -121,6 +121,10 @@ challenges:
# verifies that result = key
mode: "key"
probability: 0.1
parameters:
key-code: 200
key-mime: text/css
key-content: ""
# Challenges with a redirect via Refresh header (non-JS, requires HTTP parsing and logic)
self-header-refresh:

View File

@@ -406,7 +406,7 @@ func NewState(p policy.Policy, settings StateSettings) (state *State, err error)
redirectUri.RawQuery = values.Encode()
w.Header().Set("Link", fmt.Sprintf("<%s>; rel=preload; as=fetch; crossorigin=1", redirectUri.String()))
w.Header().Set("Link", fmt.Sprintf("<%s>; rel=preload; as=style; fetchpriority=high", redirectUri.String()))
defer func() {
// remove old header header!
w.Header().Del("Link")