@netlify/plugin-csp-nonce 1.3.1-alpha.2 → 1.3.3-alpha.1
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/package.json +1 -1
- package/src/__csp-nonce.ts +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@netlify/plugin-csp-nonce",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.3-alpha.1",
|
|
5
5
|
"description": "Use a nonce for the script-src and style-src directives of your Content Security Policy.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"repository": {
|
package/src/__csp-nonce.ts
CHANGED
|
@@ -30,12 +30,12 @@ params.self = true;
|
|
|
30
30
|
params.https = true;
|
|
31
31
|
params.http = true;
|
|
32
32
|
|
|
33
|
-
const handler = async (
|
|
34
|
-
const response = await context.next(
|
|
33
|
+
const handler = async (_request: Request, context: Context) => {
|
|
34
|
+
const response = await context.next();
|
|
35
35
|
|
|
36
36
|
// for debugging which routes use this edge function
|
|
37
37
|
response.headers.set("x-debug-csp-nonce", "invoked");
|
|
38
|
-
return csp(response, params)
|
|
38
|
+
return csp(response, params);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// Top 50 most common extensions (minus .html and .htm) according to Humio
|