@marcel91200 / caddy Mirror · read-only / commits / c2d889f8
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 12, 18:15 UTC

httpcaddyfile: Fix redir <to> html (#6001)

Subhaditya Nath committed Jan 10, 2024 at 17:54 UTC c2d889f85e6941b892f36c5873d3f9a4995191f8
1 file changed +1
caddyconfig/httpcaddyfile/builtins.go
+1
@@ -711,6 +711,7 @@ func parseRedir(h Helper) (caddyhttp.MiddlewareHandler, error) {
711 `
712 safeTo := html.EscapeString(to)
713 body = fmt.Sprintf(metaRedir, safeTo, safeTo, safeTo, safeTo)
714 + hdr = http.Header{"Content-Type": []string{"text/html; charset=utf-8"}}
715 code = "200" // don't redirect non-browser clients
716 default:
717 // Allow placeholders for the code