Skip to content

drutiny/cloudflare

Cloudflare always use HTTPS

Name: cloudflare:always_use_https
Package: drutiny/cloudflare
Class: \Drutiny\Cloudflare\Audit\PageRuleMatch

To ensure all traffic to is secured over an SSL connection, Cloudflare comes with a feature to force any insecure traffic to redirect to a secure connection before a connection to the origin location is attempted. This ensures all traffic to is secured between the browser and Cloudflare.

Parameters

Name Type Description Default
rule string The page rule pattern to look up. 'http://:host/*'
settings array A keyed list of actions the page rule should action. always_use_https: true

#2819197 - Cloudflare workaround for Drupal 8 urlGenerator

Name: cloudflare:drupal-urlGenerator-workaround
Package: drutiny/cloudflare
Class: \Drutiny\Cloudflare\Audit\PageRuleMatch

By accessing a site an an unexpected base path (e.g. with index.php) a site may cache links in a way that could be considered a minor site defacement and possibly lead to a duplicate content SEO penalty too. It can also impact caching strategy.

Parameters

Name Type Description Default
rule string The page rule pattern to look up. 'https://:host/index.php/*'
settings array A keyed list of actions the page rule should action. forwarding_url:
url: 'https://:host/$1'
status_code: 301

Cloudflare redirect Apex to primary domain

Name: cloudflare:redirect_apex
Package: drutiny/cloudflare
Class: \Drutiny\Cloudflare\Audit\PageRuleMatch

If is the primary site under the domain then you may want all traffic to https:/// to be redirected to https:///. This ensures all traffic to both and are routed through a common domain and makes management of Cloudflare Page Rules easier to administer. This reduces the likelihood of strange behaviour due to Page Rules.

Parameters

Name Type Description Default
rule string The page rule pattern to look up. 'https://:zone/*'
settings array A keyed list of actions the page rule should action. forwarding_url:
url: 'https://:host/$1'
status_code: 301