Error: Origin SSL Handshake Error (525)

From the above screenshot, it seems that error is comming from Cloudflare.

Is the external Website working over HTTPS? - seems it’s working and it’s also on Cloudflare too.

Seems like you are missing a part of a code in your snippet.

Works for me, here:

My below code working from this source:

addEventListener('fetch', function(event) {
async function handleRequest(request) {
  // Only GET requests work with this proxy.
  if (request.method !== 'GET') return MethodNotAllowed(request)
  return fetch(``)
function MethodNotAllowed(request) {
  return new Response(`Method ${request.method} not allowed.`, {
    status: 405,
    headers: {
      'Allow': 'GET'

To use it on your domain, you might need to have DNS records pointed (for example A www and A to and added the active Worker (in production) under the zone to the route like*) and setup a Page Rule for the SSL (Full maybe?).

Otherwise it’s the cause as stated from below cite:

Okay, neither with Fetch HTML - Fetch HTML · Cloudflare Workers docs does’t work and I have tried all 3 SSL settings, none.

I tested some other Website over HTTPS, it’s working.
Even some of mine’s on Cloudflare, working fine.

Except, those who have Firewall Rules and some other security settings, but I accordingly get 1020 Access Denide or some other know error so far.