mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-03 00:09:39 +08:00
caddyhttp: Add time.now placeholder and update cel-go (closes #2594)
This commit is contained in:
@ -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":
|
||||
|
||||
Reference in New Issue
Block a user