Page rules can be used to customise your Peakhour settings for different sections of your site. For example you might want to customise CDN caching options for your checkout process, or pagespeed optimisation. Page rules are also ordered with the first matching rule being executed.

page rules

Configuration options

Pattern will be matched against URL path. It is possible to use * in pattern. Normally pattern is expected to start with / symbol. Patterns are matched in order of adding, strings are case sensitive.

Examples:

  • /
  • /some/path/to.jpg
  • *jpg

GZIP

Enable or disable GZIP

Websocket enabled

Support websocket protocol.

Track sessions

Set session id cookie if enabled. Allows to track what request were made by client during one session

Redirection

HTTP redirect location

Redirect to URL if set.

HTTP redirect status code

If HTTP redirect location is set then redirect with given status code (normally either 301 (default) or 302).

Caching

CDN

Cache resources using external fetcher

CDN query mode

Criteria to use when considering and storing fetched resources and query string behaviour.

Setting Description
none don't cache resources with a query string
full cache resources using the full query string
strip cache resources but strip the query string

Implicit cache TTL

In seconds. Specify the lifetime of cached objects.

Skip CDN if request has cookie matching given pattern. Pattern can contain * to match zero or more symbols and | to separate matches.

CDN remove query args

Remove given query arguments with its values from request path before looking up CDN resource. Value is comma-separated list of argument names.

Cache enabled

Enable in-memory, in-line caching of content.

Content is cached based on the Cache-Control header.

Cache subkey vars

Use additional variables to construct cache key in addition to host/path. Accepts |-separated list of key[:value] variables.

Scheme Description
query cache based on query string, cache key is based on query string
header_present cache based on request header present, cache key is based on header name
header accepts request header name as value, cache key is constructed based on header value
language cache based on Accept-Language, cache key is constructed based on first value of header

Cache strip cookies

Strip Set-Cookie headers from stored responses and Cookie from outgoing requests to potentially cacheable resources.

Edge TTL sec

Force cache resources for at least given seconds. If resource can be cached for longer (because allowed by cache control or implicit cache ttl) then cache it for longer than given value. Zero value (default) honors origin resource headers. The value is internal and not visible to clients, they still get original headers.

Browser TTL sec

Override Cache-Control: max-age for cached contents to have at least given value. Negative value (default) honors origin resource headers. Zero value means cached resources are not allowed to be cached by clients (max-age=0). The value is not used by RP itself in any way but only returned to clients to allow browser and RP cache to store same resource for different time.

Modsecurity

Blocklists

Comma separated list of blocklists.

Modsecurity mode

Specify how the WAF reacts to security violations.

Setting Description
none disable
enforce send a HTTP 403 when a rule is triggered
warn log the violation and allow to pass, useful for testing

ModSecurity rules

List of rule rules to enabled.

Modsecurity removed rules

List of rule rules to skip.

Pagespeed

Pagespeed mode

Specify Pagespeed handling mode. The following options can be configured.

Setting Description
none disable-pagespeed
full full page rewriting
requests-only serve rewritten resources but don't rewrite the page

Pagespeed configuration

Specific pagespeed configuration directives.

Pagespeed enable rules

Enable specific pagespeed rules.

Pagespeed disable rules

Enable specific pagespeed rules.

Pagespeed enable beacon

Specify beacon behaviour for real user instrumentation.

Pagespeed enable push

Analyse page content and use HTTP2 push of resources

Pagespeed enable downstream cache

Enable pagespeed in downstream cache mode. Used to cache rewritten pages.

Pagespeed options

Specific pagespeed options to use

LUA

Lua enabled

Enable executing LUA at the edge for the given url. Please contact support for further information regarding this feature.

Lua request headers filter

Lua script to execute on request.

Lua response headers filter

Lua script to execute on response.

Origin

Load balancing mode

Specify load balancing mode.

Setting Description
none no load balancing, requests are sent to first origin
round-robin round robin requests between origins
client-address bind client ips to a particular origin for session persistence

Origin pool

Tag of origin pool to use.

Replace host

Host header to use for downstream connections.

Replace path

Replace path prefix of downstream requests. Format is ="%source% %dest%"=. .

Rate limiting

Rate limit mode

Choose when to block rate limited requests based on list of |-separated modes. Possible values are:

Setting Description
none no rate limiting
global use global rate limiter
vhost rate limit virtual-host
vhost-busy rate limit on virtualhost-busy
zone rate limit to zone

Rate limit zone

Use given zone name to rate limit requests against. Make sure Rate limit mode value includes zone or all.