let referer = request.headers.get("Referer") if (referer && new URL(referer).hostname != url.hostname) { return new Response( "Hotlinking not allowed.", { status: 403 }) }