Skip to content

Commit c2d889f

Browse files
authored
httpcaddyfile: Fix redir <to> html (#6001)
1 parent cb86319 commit c2d889f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

caddyconfig/httpcaddyfile/builtins.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ func parseRedir(h Helper) (caddyhttp.MiddlewareHandler, error) {
711711
`
712712
safeTo := html.EscapeString(to)
713713
body = fmt.Sprintf(metaRedir, safeTo, safeTo, safeTo, safeTo)
714+
hdr = http.Header{"Content-Type": []string{"text/html; charset=utf-8"}}
714715
code = "200" // don't redirect non-browser clients
715716
default:
716717
// Allow placeholders for the code

0 commit comments

Comments
 (0)