challenges/context: allow setting request headers towards the backend

This commit is contained in:
WeebDataHoarder
2025-05-03 15:55:13 +02:00
parent 3d73ee76c4
commit 2cb5972371
3 changed files with 35 additions and 17 deletions

View File

@@ -323,9 +323,7 @@ func (state *State) ServeHTTP(w http.ResponseWriter, r *http.Request) {
data.EvaluateChallenges(w, r)
if state.Settings().MainName != "" {
w.Header().Add("Via", fmt.Sprintf("%s %s@%s", r.Proto, state.Settings().MainName, state.Settings().MainVersion))
}
data.ResponseHeaders(w.Header())
state.Mux.ServeHTTP(w, r)
}