siarashield_workspace 0.0.20 → 0.0.22

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 CHANGED
@@ -109,18 +109,16 @@ To make CSP setup easier for customers, the plugin now exports helpers:
109
109
  ```ts
110
110
  import { getSiaraShieldCspPolicy, mergeSiaraShieldCspPolicy } from 'siarashield_workspace';
111
111
 
112
- const policy = getSiaraShieldCspPolicy({ nonce: 'server-generated-nonce' });
112
+ const policy = getSiaraShieldCspPolicy();
113
113
 
114
- const mergedPolicy = mergeSiaraShieldCspPolicy("default-src 'self'", {
115
- nonce: 'server-generated-nonce',
116
- });
114
+ const mergedPolicy = mergeSiaraShieldCspPolicy("default-src 'self'");
117
115
  ```
118
116
 
119
117
  Recommended CSP baseline:
120
118
 
121
119
  ```http
122
- script-src 'self' 'nonce-<server-generated-nonce>' https://embedcdn.mycybersiara.com https://embed.mycybersiara.com;
123
- script-src-elem 'self' 'nonce-<server-generated-nonce>' https://embedcdn.mycybersiara.com https://embed.mycybersiara.com;
120
+ script-src 'self' https://embedcdn.mycybersiara.com https://embed.mycybersiara.com;
121
+ script-src-elem 'self' https://embedcdn.mycybersiara.com https://embed.mycybersiara.com;
124
122
  connect-src 'self' https://embed.mycybersiara.com;
125
123
  img-src 'self' data: https://embed.mycybersiara.com;
126
124
  style-src 'self' 'unsafe-inline';
@@ -130,9 +128,7 @@ If the customer still loads jQuery from another CDN like Google, they should als
130
128
 
131
129
  You can use `getSiaraShieldCspPolicy(...)` to generate the plugin baseline from the plugin side instead of hardcoding it in customer projects.
132
130
 
133
- If your site uses nonce-based CSP, pass `cspNonce` to `initSiaraShield(...)` or `SiaraShieldComponent`.
134
-
135
- This package now preloads `SiaraShield_Validation.js` with the same nonce to reduce CSP issues from the vendor bootstrap chain.
131
+ This package now preloads `SiaraShield_Validation.js` to reduce CSP issues from the vendor bootstrap chain.
136
132
 
137
133
  The plugin can help generate the CSP string, but the final CSP header/meta must still be applied by the customer project.
138
134
 
@@ -140,7 +136,7 @@ The plugin can help generate the CSP string, but the final CSP header/meta must
140
136
 
141
137
  - Captcha not visible -> confirm `<div class="SiaraShield"></div>` is present
142
138
  - `CheckCaptcha` not available -> ensure `initSiaraShield(...)` ran successfully
143
- - CSP warning or script load failure -> allow the `script-src`, `connect-src`, and `img-src` hosts above and reuse your page nonce with `cspNonce`
139
+ - CSP warning or script load failure -> allow the `script-src`, `connect-src`, and `img-src` hosts above
144
140
  - Token empty -> check browser console and network calls after clicking submit
145
141
 
146
142
  ## Build and pack (library maintainers)
@@ -148,4 +144,4 @@ The plugin can help generate the CSP string, but the final CSP header/meta must
148
144
  ```bash
149
145
  npm run build:lib
150
146
  npm run pack:lib
151
- ```
147
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "siarashield_workspace",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "Angular wrapper for CyberSiara SiaraShield captcha embed.",
5
5
  "keywords": [
6
6
  "cybersiara",