summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-01-17 11:38:49 -0700
committerMatthew Holt <[email protected]>2020-01-17 11:38:49 -0700
commit372540f0ee7f534d15ce000af176d0880efba5a3 (patch)
treea745f1b895980573ab03f9e5bfa02d861ad78853
parent793a4058105bb4da2a03291c391a91a432d1893f (diff)
downloadcaddy-372540f0ee7f534d15ce000af176d0880efba5a3.tar.gz
caddy-372540f0ee7f534d15ce000af176d0880efba5a3.zip
httpcaddyfile: Move redir before rewrite
Using rewrite is like saying, "I accept this request, but I just need to act on it as if it came in differently." Whereas redir implies more of, "I reject this request, send it to me differently, then I will process it." Makes sense for it to come before rewrites. This can always be changed using the 'order' global option if needed.
-rw-r--r--caddyconfig/httpcaddyfile/directives.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/caddyconfig/httpcaddyfile/directives.go b/caddyconfig/httpcaddyfile/directives.go
index ab7a0404b..7acdb8cec 100644
--- a/caddyconfig/httpcaddyfile/directives.go
+++ b/caddyconfig/httpcaddyfile/directives.go
@@ -29,12 +29,14 @@ import (
var directiveOrder = []string{
"root",
+ "redir",
"rewrite",
"strip_prefix",
"strip_suffix",
"uri_replace",
"try_files",
+
"basicauth",
"headers",
"request_header",
@@ -44,7 +46,6 @@ var directiveOrder = []string{
"handle",
"route",
- "redir",
"respond",
"reverse_proxy",
"php_fastcgi",