Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
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.
Matthew Holt committed
Jan 17, 2020 at 11:38 UTC
372540f0ee7f534d15ce000af176d0880efba5a3
1 file changed
+2
-1
caddyconfig/httpcaddyfile/directives.go
+2
-1
@@ -29,12 +29,14 @@ import (
29
var directiveOrder = []string{
30
"root",
31
32
+ "redir",
33
"rewrite",
34
35
"strip_prefix",
36
"strip_suffix",
37
"uri_replace",
38
"try_files",
39
+
40
"basicauth",
41
"headers",
42
"request_header",
@@ -44,7 +46,6 @@ var directiveOrder = []string{
46
"handle",
47
"route",
48
47
- "redir",
49
"respond",
50
"reverse_proxy",
51
"php_fastcgi",