aboutsummaryrefslogtreecommitdiffhomepage
path: root/replacer.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2020-05-21 18:19:01 -0600
committerMatthew Holt <[email protected]>2020-05-21 18:19:01 -0600
commit0cbf467b3fbde471e5ee67680fb98a9af2a9b16e (patch)
treebc63554172715f80e074bd8123ef6b9c2232b998 /replacer.go
parentbb67e19d7bacd70a13647538c8e9820eb42090b2 (diff)
downloadcaddy-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.go2
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":