diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-02-04 13:31:22 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-02-04 13:31:22 -0700 |
commit | c0f827e0bdbd779be5430d76a4eee99fc2153baf (patch) | |
tree | e60259fb54058025d24fcef39211f4d468bb8725 /caddyconfig/httpcaddyfile | |
parent | 490cd02f826b00e52b6503b61436b8c7444fc30e (diff) |
httpcaddyfile: Add {remote} shorthand placeholders
Also sort the list
Diffstat (limited to 'caddyconfig/httpcaddyfile')
-rw-r--r-- | caddyconfig/httpcaddyfile/httptype.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index 88ca7e4..5620c2e 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -94,15 +94,18 @@ func (st ServerType) Setup(originalServerBlocks []caddyfile.ServerBlock, // their actual placeholder identifiers or // variable names replacer := strings.NewReplacer( - "{uri}", "{http.request.uri}", - "{path}", "{http.request.uri.path}", + "{dir}", "{http.request.uri.path.dir}", + "{file}", "{http.request.uri.path.file}", "{host}", "{http.request.host}", "{hostport}", "{http.request.hostport}", "{method}", "{http.request.method}", - "{scheme}", "{http.request.scheme}", - "{file}", "{http.request.uri.path.file}", - "{dir}", "{http.request.uri.path.dir}", + "{path}", "{http.request.uri.path}", "{query}", "{http.request.uri.query}", + "{remote_host}", "{http.request.remote.host}", + "{remote_port}", "{http.request.remote.port}", + "{remote}", "{http.request.remote}", + "{scheme}", "{http.request.scheme}", + "{uri}", "{http.request.uri}", ) for _, segment := range sb.block.Segments { for i := 0; i < len(segment); i++ { |