Worker "isSecureContext" is set to false locally
Hi! A library that I'm using uses the Web Crypto API which checks
(!globalThis.isSecureContext)
which fails while developing locally.
It seems like worker's aren't running in a secure context. Is there some sort of setting that I need to change which will fix this?2 Replies
For reference, this is the function being checked
https://developer.mozilla.org/en-US/docs/Web/API/isSecureContext
MDN Web Docs
isSecureContext global property - Web APIs | MDN
The global isSecureContext read-only property returns a boolean indicating whether
the current context is secure
(true) or not (false).
Turns out I can just manually set this,
globalThis.isSecureContext = true