summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2020-03-22 09:04:40 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2020-03-22 09:04:40 -0600
commitbea8dedfb2b3bc11ad910853bcbe5601c729b548 (patch)
tree6baacd4a78c404b1fdb61fb7d2cc468b82f0392e
parentf2ce81cc8b5adcd453566d292ac0b0b47fc64e99 (diff)
httpcaddyfile: Move header before redir (fixes #3148)
-rw-r--r--caddyconfig/httpcaddyfile/directives.go7
1 files changed, 5 insertions, 2 deletions
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",