sfe: Fix broken unpause form (#8075)

Fix incorrect struct member name cause broken unpause form caused by
https://github.com/letsencrypt/boulder/pull/8066. Add the `text/html` 
Content-Type header to all rendered templates.
This commit is contained in:
Phil Porada 2025-03-21 14:47:08 -07:00 committed by GitHub
parent b491abb051
commit d3669ebde9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,7 @@
following:
</p>
<ul>
{{ range $identifier := .Identifiers }}<li>{{ $identifier}}</li>{{ end }}
{{ range $identifier := .Idents }}<li>{{ $identifier}}</li>{{ end }}
</ul>
<p>
These identifiers were paused after consistently failing validation

View File

@ -124,6 +124,7 @@ func (sfe *SelfServiceFrontEndImpl) renderTemplate(w http.ResponseWriter, filena
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
err := sfe.templatePages.ExecuteTemplate(w, filename, dynamicData)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
@ -169,6 +170,8 @@ func (sfe *SelfServiceFrontEndImpl) UnpauseForm(response http.ResponseWriter, re
return
}
// If any of these values change, ensure any relevant pages in //sfe/pages/
// are also updated.
type tmplData struct {
PostPath string
JWT string