From c2d889f85e6941b892f36c5873d3f9a4995191f8 Mon Sep 17 00:00:00 2001 From: Subhaditya Nath <56714626+subnut@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:54:47 +0530 Subject: [PATCH] httpcaddyfile: Fix redir html (#6001) --- caddyconfig/httpcaddyfile/builtins.go | 1 + 1 file changed, 1 insertion(+) diff --git a/caddyconfig/httpcaddyfile/builtins.go b/caddyconfig/httpcaddyfile/builtins.go index f345a676..701beff7 100644 --- a/caddyconfig/httpcaddyfile/builtins.go +++ b/caddyconfig/httpcaddyfile/builtins.go @@ -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