Introduction
This is for Chinafy users whose sites are using either Cloudflare free or paid plans. As the integration is more involved, please ensure you are working with your Webmaster to implement/troubleshoot any issues related to this configuration.
Original Instructions to Cloudflare Go Live here.
1. Double-Check your Origin-Routing Script 'Chinafy_Target_Host' Value
Cloudflare Dashboard > Workers > Launch Editor > Script > Origin-Routing 'Edit'
const CHINAFY_TARGET_HOST = 'chinafytarget.yourDomainName.com';
async function handleRequest(request) {
let config = {};
if(request.cf.country === 'CN'){
config.cf = {resolveOverride: CHINAFY_TARGET_HOST};
}
return fetch(request, config);
}
addEventListener('fetch', event => {
event.passThroughOnException();
event.respondWith(handleRequest(event.request));
});
The end result should look something like this.
2. Review your DNS Settings
Cloudflare Dashboard > DNS
a) Verify that original 'www' record has been successfully duplicated to create a 'chinafyorigin' record with Proxy Status of Chinafy Origin being DNS only.
b) Verify that new chinafytarget CNAME record with Chinafy endpoint with Proxy Status, Proxied.
Still finding that your Chinafy site is not live after this?
Contact our technical team at info@chinafy.com with a title 'Technical Cloudflare Help'.
Click here to return to Chinafy.com, or return to your Chinafy Dashboard here
Comments
0 comments
Please sign in to leave a comment.