Skip to content

Instantly share code, notes, and snippets.

View gigincg's full-sized avatar
:octocat:

Gigin George gigincg

:octocat:
View GitHub Profile
@gigincg
gigincg / cloudflared_worker_medispeak.js
Last active October 23, 2024 03:57 — forked from tellmeY18/worker.js
Cloudflare-Inject script for cloudflare inject
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
// Fetch the original HTML response
const response = await fetch(request)
// If the response is a redirect, return it immediately without modification
if (response.redirected || response.status === 301 || response.status === 302) {