How to configure Patchstack to work with Cloudflare?
The following steps should only be taken if your site is properly configured behind a Cloudflare proxy. On misconfigured sites, this could allow for IP address spoofing to exist which could potentially lead to a DoS attack
IP address header
Section titled “IP address header”In order for Patchstack to properly work with Cloudflare, we recommend that you configure the IP address header override option.
- Go to Patchstack App > Sites > yourdomain.com > Protection > Additional settings
- To the IP Address Header Override input, type HTTP_CF_CONNECTING_IP
- Save the settings
Support for TLS 1.2 is required
Section titled “Support for TLS 1.2 is required”Cloudflare supports only TLS 1.3 by default. To use Patchstack, additional support for TLS 1.2 is required. To add support for this TLS version in Cloudflare:
- Login at Cloudflare, and click on your domain name
- In the menu, go to SSL/TLS > Edge Certificates
- Scroll down to the “Minimum TLS Version” section
- Ensure that it is set to at least TLS 1.2 or lower
Custom rules
Section titled “Custom rules”Sometimes due to specific settings in Cloudflare, you may need to whitelist Patchstack’s IP addresses. Click here to see all the IP addresses that Patchstack servers use.
In case there are still problems with connecting Patchstack, an additional Cloudflare rule that might work is to pass the request if the query string contains “_wcb” or query parameter “_wcb” is set.