Skip to content

Commit

Permalink
httpcaddyfile: Fix redir <to> html (#6001)
Browse files Browse the repository at this point in the history
  • Loading branch information
subnut committed Jan 10, 2024
1 parent cb86319 commit c2d889f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions caddyconfig/httpcaddyfile/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ func parseRedir(h Helper) (caddyhttp.MiddlewareHandler, error) {
`
safeTo := html.EscapeString(to)
body = fmt.Sprintf(metaRedir, safeTo, safeTo, safeTo, safeTo)
hdr = http.Header{"Content-Type": []string{"text/html; charset=utf-8"}}
code = "200" // don't redirect non-browser clients
default:
// Allow placeholders for the code
Expand Down

0 comments on commit c2d889f

Please sign in to comment.