Skip to content

Commit 6815edd

Browse files
authored
docs: include algorithm in Content Security Policy hash (#4690)
1 parent 4c7af0a commit 6815edd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/plugin-legacy/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ export default {
156156

157157
The legacy plugin requires inline scripts for [Safari 10.1 `nomodule` fix](https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc), SystemJS initialization, and dynamic import fallback. If you have a strict CSP policy requirement, you will need to [add the corresponding hashes to your `script-src` list](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_inline_script):
158158

159-
- `MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`
160-
- `tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`
161-
- `T9h4ixy0FtNsCwAyTfBtIY6uV5ZhMeNQIlL42GAKEME=`
159+
- `sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=`
160+
- `sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=`
161+
- `sha256-T9h4ixy0FtNsCwAyTfBtIY6uV5ZhMeNQIlL42GAKEME=`
162162

163-
These values can also be retrieved via
163+
These values (without the `sha256-` prefix) can also be retrieved via
164164

165165
```js
166166
const { cspHashes } = require('@vitejs/plugin-legacy')

0 commit comments

Comments
 (0)