URL Configuration Phase#
The URL Configuration phase processes rules upon receiving request headers with known host/path. It updates the vconf of matched URL configs, allowing gradual migration from old URL configs to new rules.
Behavior#
When a rule condition is missing or evaluates to true, Peakhour executes actions for that rule and stops processing further rules. This behavior emulates the old URL config system where only the first matching URL config was applied.
Available Actions#
vconf.set
: Sets configuration parameters and stops processing.vconf.set.continue
: Sets configuration parameters and continues processing.vconf.set.stop
: Sets configuration parameters and stops processing.
Available Fields#
Available Functions#
Example#
The filter matches requests with a URI path that contains "/static/":
(http.request.uri.path, "/static/")
The configuration enables caching for static assets:
vconf.set:
cdn_enabled: "true"
cdn_query_mode: "strip"
implicit_cache_ttl: "86400"
This configuration enables caching for all requests to the "/static/" directory, strips query parameters, and sets a cache TTL of 24 hours (86400 seconds). For more information on these settings, refer to the CDN enabled, CDN query mode, and Implicit cache TTL sections in the vconf documentation.