@nosecone/sveltekit 1.0.0-alpha.32 → 1.0.0-alpha.34
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/index.d.ts +1 -2
- package/index.js +2 -2
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import nosecone from "nosecone";
|
|
2
2
|
import type { CspDirectives, NoseconeOptions } from "nosecone";
|
|
3
3
|
import type { Handle, KitConfig } from "@sveltejs/kit";
|
|
4
|
+
export { withVercelToolbar, type NoseconeOptions } from "nosecone";
|
|
4
5
|
export declare const defaults: {
|
|
5
6
|
readonly directives: {
|
|
6
7
|
readonly scriptSrc: readonly ["'strict-dynamic'"];
|
|
@@ -18,7 +19,6 @@ export declare const defaults: {
|
|
|
18
19
|
readonly objectSrc: readonly ["'none'"];
|
|
19
20
|
readonly styleSrc: readonly ["'self'"];
|
|
20
21
|
readonly workerSrc: readonly ["'self'"];
|
|
21
|
-
readonly upgradeInsecureRequests: true;
|
|
22
22
|
};
|
|
23
23
|
readonly contentSecurityPolicy: {
|
|
24
24
|
readonly directives: {
|
|
@@ -37,7 +37,6 @@ export declare const defaults: {
|
|
|
37
37
|
readonly scriptSrc: readonly ["'self'"];
|
|
38
38
|
readonly styleSrc: readonly ["'self'"];
|
|
39
39
|
readonly workerSrc: readonly ["'self'"];
|
|
40
|
-
readonly upgradeInsecureRequests: true;
|
|
41
40
|
};
|
|
42
41
|
};
|
|
43
42
|
readonly crossOriginEmbedderPolicy: {
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import nosecone, { defaults as defaults$1, CONTENT_SECURITY_POLICY_DIRECTIVES, NoseconeValidationError, QUOTED } from 'nosecone';
|
|
2
|
-
export { default } from 'nosecone';
|
|
2
|
+
export { default, withVercelToolbar } from 'nosecone';
|
|
3
3
|
|
|
4
4
|
const defaults = {
|
|
5
5
|
...defaults$1,
|
|
@@ -18,7 +18,7 @@ function createHook(options = defaults) {
|
|
|
18
18
|
return async ({ event, resolve }) => {
|
|
19
19
|
const response = await resolve(event);
|
|
20
20
|
const headers = nosecone(options);
|
|
21
|
-
for (const [headerName, headerValue] of
|
|
21
|
+
for (const [headerName, headerValue] of headers.entries()) {
|
|
22
22
|
// Only add headers that aren't already set. For example, SvelteKit will
|
|
23
23
|
// likely have added `Content-Security-Policy` if configured with `csp`
|
|
24
24
|
if (!response.headers.has(headerName)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nosecone/sveltekit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.34",
|
|
4
4
|
"description": "Protect your SvelteKit application with secure headers",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://arcjet.com",
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
"test": "node --test"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"nosecone": "1.0.0-alpha.
|
|
42
|
+
"nosecone": "1.0.0-alpha.34"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@sveltejs/kit": ">=2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@arcjet/eslint-config": "1.0.0-alpha.
|
|
49
|
-
"@arcjet/rollup-config": "1.0.0-alpha.
|
|
50
|
-
"@arcjet/tsconfig": "1.0.0-alpha.
|
|
51
|
-
"@rollup/wasm-node": "4.
|
|
52
|
-
"@sveltejs/kit": "^2.
|
|
48
|
+
"@arcjet/eslint-config": "1.0.0-alpha.34",
|
|
49
|
+
"@arcjet/rollup-config": "1.0.0-alpha.34",
|
|
50
|
+
"@arcjet/tsconfig": "1.0.0-alpha.34",
|
|
51
|
+
"@rollup/wasm-node": "4.28.0",
|
|
52
|
+
"@sveltejs/kit": "^2.9.0",
|
|
53
53
|
"@types/node": "18.18.0",
|
|
54
54
|
"typescript": "5.7.2"
|
|
55
55
|
},
|