Browse Source

httpcaddyfile: Move header before redir (fixes #3148)

master
Matthew Holt 5 years ago
parent
commit
bea8dedfb2
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 7
      caddyconfig/httpcaddyfile/directives.go

7
caddyconfig/httpcaddyfile/directives.go

@ -28,21 +28,24 @@ import (
// directiveOrder specifies the order // directiveOrder specifies the order
// to apply directives in HTTP routes. // to apply directives in HTTP routes.
var directiveOrder = []string{ var directiveOrder = []string{
"header",
"redir", "redir",
"rewrite", "rewrite",
"root", "root",
// URI manipulation
"uri", "uri",
"try_files", "try_files",
// middleware handlers that typically wrap responses // middleware handlers; some wrap responses
"basicauth", "basicauth",
"header",
"request_header", "request_header",
"encode", "encode",
"templates", "templates",
// special routing directives
"handle", "handle",
"route", "route",

Loading…
Cancel
Save