mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-14 06:46:27 +03:00
httpcaddyfile: Fix redir <to> html (#6001)
This commit is contained in:
parent
cb86319bd5
commit
c2d889f85e
1 changed files with 1 additions and 0 deletions
|
@ -711,6 +711,7 @@ func parseRedir(h Helper) (caddyhttp.MiddlewareHandler, error) {
|
||||||
`
|
`
|
||||||
safeTo := html.EscapeString(to)
|
safeTo := html.EscapeString(to)
|
||||||
body = fmt.Sprintf(metaRedir, safeTo, safeTo, safeTo, safeTo)
|
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
|
code = "200" // don't redirect non-browser clients
|
||||||
default:
|
default:
|
||||||
// Allow placeholders for the code
|
// Allow placeholders for the code
|
||||||
|
|
Loading…
Reference in a new issue