Skip to content

Instantly share code, notes, and snippets.

View GilbN's full-sized avatar

GilbN GilbN

View GitHub Profile
@GilbN
GilbN / CF country ip block worker.md
Last active February 28, 2022 22:19
Will display custom HTML if the country ISO code is in the `blockedCountries` list

Custom CF worker to block RU and BY origin IP's

Will display custom HTML if the country ISO code is in the blockedCountries list

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request))
})