{"id":7384,"date":"2023-10-16T01:29:11","date_gmt":"2023-10-16T01:29:11","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=7384"},"modified":"2023-10-16T01:29:14","modified_gmt":"2023-10-16T01:29:14","slug":"cloudflare-workers-to-disable-unsecure-tls-ciphers","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/cloudflare-workers-to-disable-unsecure-tls-ciphers","title":{"rendered":"Cloudflare workers to Disable Unsecure TLS Ciphers"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code class=\"\">addEventListener('fetch', event => {\r\n    event.respondWith(handleRequest(event.request))\r\n})\r\n\r\nasync function handleRequest(request) {\r\n    let tlsCipher = (request.cf || {}).tlsCipher\r\n    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']\r\n    if (blockCiphers.includes(tlsCipher)) {\r\n        return new Response(\"Please use a more secure Browser\", {\r\n            status: 403,\r\n            statusText: \"Forbidden\"\r\n        })\r\n    }\r\n    const response = await fetch(request)\r\n    return response\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7384","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=7384"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7384\/revisions"}],"predecessor-version":[{"id":7385,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/7384\/revisions\/7385"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=7384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=7384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=7384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}