lokiwind
CDCloudflare Developers
•Created by lokiwind on 7/5/2023 in #workers-help
Creating worker with api
19 replies
CDCloudflare Developers
•Created by lokiwind on 6/5/2023 in #general-help
Wordpress directly url rule.
1 replies
CDCloudflare Developers
•Created by lokiwind on 6/3/2023 in #general-help
Rate limit does not egual path
7 replies
CDCloudflare Developers
•Created by lokiwind on 6/2/2023 in #workers-help
Listing Firewall Events..
I am listing Cloudflare firewall events.
However, instead of writing which rule is in the source section, it says firewallCustom.
How can i fix this...
My code: https://discord.com/channels/595317990191398933/1114130327351332964
Source eq: Http 1.0 Block Rule...
25 replies
CDCloudflare Developers
•Created by lokiwind on 5/26/2023 in #workers-help
workers txt reading and writing
8 replies
CDCloudflare Developers
•Created by lokiwind on 5/25/2023 in #workers-help
Listing more than 1k KV keys
Hello, can this code list more than 1k data that I saved to KV storage at the same time?
NOTE:The code currently lists the data without problems, but I wondered if it lists all data when there is more than 1k data
3 replies
CDCloudflare Developers
•Created by lokiwind on 5/24/2023 in #workers-help
Problem saving data 2 times in 1 request
18 replies
CDCloudflare Developers
•Created by lokiwind on 4/11/2023 in #workers-help
2 return fetch request
Hello, I am using this workers code in front of my website, but when I use "return fetch(request);" instead of the return "fetch(url, init);" parameter in line 24, the post operation does not occur. How can I replace "fetch(url, init);" with "return fetch(request);"..
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const ip = request.headers.get("CF-Connecting-IP");
const countryCode = request.headers.get("CF-IPCountry");
const response = await fetch("https://mypage.xx/ip.txt");
const text = await response.text();
const ipInfo = text.trim().split('\n').find(line => line.startsWith(ip));
if (ipInfo) {
return fetch(request);
}
const url = "https://mypage.xx/public.php";
const data = new URLSearchParams({ "data":
${ip}|${countryCode} });
const init = {
method: "POST",
body: data
};
return fetch(url, init);
}
2 replies