From bea8dedfb2b3bc11ad910853bcbe5601c729b548 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Sun, 22 Mar 2020 09:04:40 -0600 Subject: httpcaddyfile: Move header before redir (fixes #3148) --- caddyconfig/httpcaddyfile/directives.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'caddyconfig') diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go index 451850b..ba8f438 100644 --- a/caddyconfig/httpcaddyfile/directives.go +++ b/caddyconfig/httpcaddyfile/directives.go @@ -28,21 +28,24 @@ import ( // directiveOrder specifies the order // to apply directives in HTTP routes. var directiveOrder = []string{ + "header", + "redir", "rewrite", "root", + // URI manipulation "uri", "try_files", - // middleware handlers that typically wrap responses + // middleware handlers; some wrap responses "basicauth", - "header", "request_header", "encode", "templates", + // special routing directives "handle", "route", -- cgit v1.2.3