cloudflare
Cloudflare and nginx: Too many redirects
After tryouts I found that this is only related to Cloudflare. Because I had no redirect problem before moving to Cloudflare. In my case it was a simple fix like this. Select [Crypto] box and select Full (strict) as in the image. Really, you can try this out first before any other actions.
How Do I Create Sub-Sub-Domain on Cloudflare DNS?
In Cloudflare, open the DNS records for domain.example Create a A record for example.id and enter the IP where my.id.domain.example will be hosted, and add record Setup the site my.id.domain.example at the IP you specified If domain.example is on Cloudflare and the Cloudflare nameservers have propagated, the sub-sub domain propagation should be more or less … Read more
How to make nginx redirect based on the value of a header?
The simplest way to do this is with an if directive. If there is a better way, please let me know, as people say the if directive is inefficient. Nginx converts dashes to underscores in headers, so X-Forwarded-Proto becomes $http_x_forwarded_proto. server { listen 80; server_name example.com; # Replace this with your own hostname if ($http_x_forwarded_proto … Read more
Is it possible to increase CloudFlare time-out?
No, CloudFlare only offers that kind of customisation on Enterprise plans. CloudFlare will time out if it fails to establish a HTTP handshake after 15 seconds. CloudFlare will also wait 100 seconds for a HTTP response from your server before you will see a 524 timeout error. Other than this there can be timeouts on … Read more
Can one cache and secure a REST API with Cloudflare?
Cloudflare has published a list of best practices for using it with APIs. TL;DR, they recommend setting a page rule that patches all API requests and putting the following settings on it: Cache Level: Bypass Always Online: OFF Web Application Firewall: OFF Security Level: Anything but “I’m under attack” Browser Integrity Check: OFF
how to disable direct access to a web site by ip address
server { listen 80 default_server; listen [::]:80 default_server; server_name “”; return 444; } You need to specify default_server parameter so that all non available server requests goes to this server block which throws 444 error. 444 : CONNECTION CLOSED WITHOUT RESPONSE ref: https://httpstatuses.com/444
What are the best practice for domain names (dev, staging, production)? [closed]
There are only two hard things in Computer Science: cache invalidation and naming things. — Phil Karlton Depends on the company size. Small businesses usually go for dashes and get the wildcard certificate. So they would have dev.example.com, test.example.com In larger enterprises they usually have a DNS infrastructure rolled out and the provisioning processes takes … Read more
What is a Ray ID (Cloudflare)?
It is a UID which can be used by the website operator (and Cloudflare support) to potentially debug issues. The ray id is actually returned in the headers of most requests through Cloudflare, just not as visibly as what you see in the case of I’m under attack mode.