Page 1 of 1

the buildin cloudflare cannot enable

Posted: 05 Dec 2020, 02:52
by cinte
I have set the cloudflare email and key in my panel, but the cloudflare button did not appear in the top-right of my page. I have read the topic viewtopic.php?f=61&t=8574&start=15   (#30). however, I cannot redirect my web ffxiv.cinte.cc to cinte.cc because my cloudflare cdn is set by cname, so I cannot add new record without prefix.
Is there any other way to enable buildin cloudflare control?

Re: the buildin cloudflare cannot enable

Posted: 05 Dec 2020, 03:13
by mjau-mjau
What exactly are you trying to do? The Cloudflare email/key settings in panel have nothing to do with your subdomains or cname ... The only thing it does, is allow flushing of page-cache from the panel interface.

Re: the buildin cloudflare cannot enable

Posted: 05 Dec 2020, 06:32
by cinte
mjau-mjau wrote: What exactly are you trying to do? The Cloudflare email/key settings in panel have nothing to do with your subdomains or cname ... The only thing it does, is allow flushing of page-cache from the panel interface.
Image
Sorry i can't express it well in english, I mean this small cloudflare button only appears when the website domain is example.com rather than xxx.example.com. There are some reasons that I cannot use example.com, is there any another way to let it works when I use xxx.example.com to access my website?

Re: the buildin cloudflare cannot enable

Posted: 05 Dec 2020, 07:58
by mjau-mjau
The X3 panel will load data from Cloudflare based on your domain.  If it doesn't work from subdomain, try to open /panel/cloudflare.php and edit line 231:
Code
return zones(get_domain($_SERVER['HTTP_HOST']));
Change to the below, manually entering your primary domain name.
Code
return zones('primarydomain.com');
PS! This feature is currently slightly outdated, because Cloudflare recently introduced a maximum of 30 requests to purge from the cache from the Cloudflare API. That means X3 can only purge the CF cache for 15 pages (two requests JSON + HTML for each page). Also, this feature really does not offer much benefit any more ... X3 pages (ajax/json pages) will already be cached on Cloudflare (if your website is on Cloudflare), and because pages get cached anyway on server, they are already fast. Besides, the speed-up from Cloudflare will only apply for visitors that visit from the same geographic location.

Re: the buildin cloudflare cannot enable

Posted: 05 Dec 2020, 08:18
by cinte
mjau-mjau wrote: The X3 panel will load data from Cloudflare based on your domain.  If it doesn't work from subdomain, try to open /panel/cloudflare.php and edit line 231:
Code
return zones(get_domain($_SERVER['HTTP_HOST']));
Change to the below, manually entering your primary domain name.
Code
return zones('primarydomain.com');
PS! This feature is currently slightly outdated, because Cloudflare recently introduced a maximum of 30 requests to purge from the cache from the Cloudflare API. That means X3 can only purge the CF cache for 15 pages (two requests JSON + HTML for each page). Also, this feature really does not offer much benefit any more ... X3 pages (ajax/json pages) will already be cached on Cloudflare (if your website is on Cloudflare), and because pages get cached anyway on server, they are already fast. Besides, the speed-up from Cloudflare will only apply for visitors that visit from the same geographic location.
Thank you for your patient answer