Cf object broken in Worker Preview


The Worker cf object is undefined in the Worker Editor Preview. It should be set to something. I wasted 15 minutes debugging why my script passed my tests, but wouldn’t load in the preview. Found the statement and code sample:

// Find TLS version - This will appear as "undefined" in the Preview
// For specific cipher blocking, you can inspect
let tlsVersion = ( || {}).tlsVersion

on the page: Which explained the problem. Please update the primary Request Attributes documentation with this information: