For Workes & Pages, what is the name of the domain?
‘angulo7.com.mx’
What is the issue or error you’re encountering
zaraz doesn’t work when Cloudflare worker is active, but works when I disable worker, saw the same errors topics, but doesn’t explain the solution.
What are the steps to reproduce the issue?
whenever I disable the worker in the Workers Routes zaraz works perfectly fine
It seems this is a common problem between Zaraz and the workers; I saw this topic Zaraz doesn't work/conflicts with Cloudflare worker - #6 by igor.seyts where the user was able to add it manually but doesn’t explain how or where.
We are using this code; we must block the connections from this region due to a local contract obligation.
export default {
async fetch(request) {
try {
const region = request.cf.region;
// Block Region
if (region == “CXX”) {
return new Response(“CXX Region is blocked”, {
status: 403,
});
}
return fetch(request);
} catch (err) {
console.error(
“request.cf does not exist in the previewer, only in production”
);
return new Response(Error in workers script ${err.message}
, {
status: 500,
});
}
},
};
Hi @guero2099
My fix was simple:
I added to the HEAD using custom scripts.
Please note: I’m using custom endpoints names, so if you are on generic names then your call for the script should look like
Hope this helps