addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
let tlsCipher = (request.cf || {}).tlsCipher
const blockCiphers = ['ECDHE_ECDSA_WITH_AES_128_CBC_SHA', 'ECDHE_ECDSA_WITH_AES_256_CBC_SHA', 'ECDHE_ECDSA_WITH_AES_128_CBC_SHA256', 'ECDHE_ECDSA_WITH_AES_256_CBC_SHA384']
if (blockCiphers.includes(tlsCipher)) {
return new Response("Please use a more secure Browser", {
status: 403,
statusText: "Forbidden"
})
}
const response = await fetch(request)
return response
}