Closed vejja closed 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuxt-security | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 11, 2024 5:35pm |
@Baroshem for some reason I had troubles rebasing the branch onto 2.1.0 - sorrry the commit timeline looks awful, but actually the amount of changes is very small
Hey Jakub, I tested it on a private repo that @brewaa provided, and it works on Cloudflare. Will merge
Resolves #541
Types of changes
Description
This PR replaces the NodeJS cryptographic primitives used in this codebase by their equivalents from the Javascript WebCrypto API.
The fundamental reason for this rewrite is to provide full compatibility with Worker-based environments, where Node's crypto module might not always be available.
The issue was first raised with Cloudflare's Workers. While manual configuration of Cloudflare worker settings (via their nodejs_compatibility flag) is possible, we believe it is better to offer a universal approach that will offer strong cryptographic guarantees in all environments.
Note: as part of this update, the NodeJS minimal version needs to be updated to v20. This is required to ensure that
crypto
is available in the global scope.Checklist: