We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitejs
Learn more about funding links in repositories.
Report abuse
crypto.getRandomValues
1 parent 9e460f5 commit f4d3c46Copy full SHA for f4d3c46
packages/vite/src/node/config.ts
@@ -767,7 +767,7 @@ export async function resolveConfig(
767
// at least 64bits is recommended
768
// https://owasp.org/www-community/vulnerabilities/Insufficient_Session-ID_Length
769
webSocketToken: Buffer.from(
770
- crypto.getRandomValues(new Uint8Array(9)),
+ crypto.randomFillSync(new Uint8Array(9)),
771
).toString('base64url'),
772
additionalAllowedHosts: getAdditionalAllowedHosts(server, preview),
773
getSortedPlugins: undefined!,
0 commit comments