siarashield_workspace 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -150,6 +150,13 @@ If you already have a server-generated nonce available in code, you can still pa
|
|
|
150
150
|
- Component input: `[cspNonce]="myNonce"`
|
|
151
151
|
- Function API: `initSiaraShield({ ..., cspNonce: myNonce })`
|
|
152
152
|
|
|
153
|
+
Common Angular way to read it from the meta tag:
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
protected readonly cspNonce =
|
|
157
|
+
document.querySelector<HTMLMetaElement>('meta[name="csp-nonce"]')?.content ?? undefined;
|
|
158
|
+
```
|
|
159
|
+
|
|
153
160
|
If omitted, the plugin auto-resolves the nonce from `meta[name="csp-nonce"]` or an existing `script[nonce]`.
|
|
154
161
|
|
|
155
162
|
## Function API (alternative)
|