mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-23 05:49:27 +01:00
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.
This commit is contained in:
parent
793a405810
commit
372540f0ee
1 changed files with 2 additions and 1 deletions
|
@ -29,12 +29,14 @@ import (
|
||||||
var directiveOrder = []string{
|
var directiveOrder = []string{
|
||||||
"root",
|
"root",
|
||||||
|
|
||||||
|
"redir",
|
||||||
"rewrite",
|
"rewrite",
|
||||||
|
|
||||||
"strip_prefix",
|
"strip_prefix",
|
||||||
"strip_suffix",
|
"strip_suffix",
|
||||||
"uri_replace",
|
"uri_replace",
|
||||||
"try_files",
|
"try_files",
|
||||||
|
|
||||||
"basicauth",
|
"basicauth",
|
||||||
"headers",
|
"headers",
|
||||||
"request_header",
|
"request_header",
|
||||||
|
@ -44,7 +46,6 @@ var directiveOrder = []string{
|
||||||
"handle",
|
"handle",
|
||||||
"route",
|
"route",
|
||||||
|
|
||||||
"redir",
|
|
||||||
"respond",
|
"respond",
|
||||||
"reverse_proxy",
|
"reverse_proxy",
|
||||||
"php_fastcgi",
|
"php_fastcgi",
|
||||||
|
|
Loading…
Reference in a new issue