caddyhttp: Add time.now placeholder and update cel-go (closes #2594)

This commit is contained in:
Matthew Holt 2020-05-21 18:19:01 -06:00
parent bb67e19d7b
commit 0cbf467b3f
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
4 changed files with 11 additions and 3 deletions

View file

@ -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":