diff options
author | Matthew Holt <[email protected]> | 2020-05-21 18:19:01 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2020-05-21 18:19:01 -0600 |
commit | 0cbf467b3fbde471e5ee67680fb98a9af2a9b16e (patch) | |
tree | bc63554172715f80e074bd8123ef6b9c2232b998 /replacer.go | |
parent | bb67e19d7bacd70a13647538c8e9820eb42090b2 (diff) | |
download | caddy-0cbf467b3fbde471e5ee67680fb98a9af2a9b16e.tar.gz caddy-0cbf467b3fbde471e5ee67680fb98a9af2a9b16e.zip |
caddyhttp: Add time.now placeholder and update cel-go (closes #2594)
Diffstat (limited to 'replacer.go')
-rw-r--r-- | replacer.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/replacer.go b/replacer.go index eac208086..86cd72980 100644 --- a/replacer.go +++ b/replacer.go @@ -276,6 +276,8 @@ func globalDefaultReplacements(key string) (interface{}, bool) { return runtime.GOOS, true case "system.arch": return runtime.GOARCH, true + case "time.now": + return nowFunc(), true case "time.now.common_log": return nowFunc().Format("02/Jan/2006:15:04:05 -0700"), true case "time.now.year": |