nuxt-security-module 4.2.0 → 4.3.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/README.md +28 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.js +105 -0
- package/dist/models/AllowedMethodsRestricterOptions.d.ts +5 -0
- package/dist/models/BasicAuthOptions.d.ts +9 -0
- package/dist/models/ContentSecurityPolicy.d.ts +3 -0
- package/dist/models/CorsHandlerOptions.d.ts +13 -0
- package/dist/models/CrossOriginEmbedderPolicy.d.ts +8 -0
- package/dist/models/CrossOriginEmbedderPolicy.js +8 -0
- package/dist/models/CsrfOptions.d.ts +6 -0
- package/dist/models/ModuleOptions.d.ts +27 -0
- package/dist/models/PermissionsPolicy.d.ts +3 -0
- package/dist/models/RateLimitWindow.d.ts +6 -0
- package/dist/models/RateLimiterOptions.d.ts +6 -0
- package/dist/models/RateLimiterStore.d.ts +6 -0
- package/dist/models/RequestSizeLimiterOptions.d.ts +6 -0
- package/dist/models/SecurityHeaders.d.ts +22 -0
- package/dist/models/SecurityRouteRules.d.ts +4 -0
- package/dist/models/SecurityRules.d.ts +4 -0
- package/dist/models/SsgOptions.d.ts +9 -0
- package/dist/models/StrictTransportSecurity.d.ts +7 -0
- package/dist/models/XFrameOptions.d.ts +7 -0
- package/dist/models/XFrameOptions.js +7 -0
- package/dist/runtime/constants.d.ts +24 -0
- package/dist/runtime/constants.js +52 -0
- package/dist/runtime/nitro/plugins/hidePoweredBy.d.ts +5 -0
- package/dist/runtime/nitro/plugins/hidePoweredBy.js +13 -0
- package/dist/runtime/nitro/plugins/nonce.d.ts +5 -0
- package/dist/runtime/nitro/plugins/nonce.js +27 -0
- package/dist/runtime/nitro/plugins/routeRules.d.ts +5 -0
- package/dist/runtime/nitro/plugins/routeRules.js +17 -0
- package/dist/runtime/nitro/plugins/securityHeaders.d.ts +5 -0
- package/dist/runtime/nitro/plugins/securityHeaders.js +25 -0
- package/dist/runtime/nitro/plugins/ssgHashes.d.ts +5 -0
- package/dist/runtime/nitro/plugins/ssgHashes.js +27 -0
- package/dist/runtime/nitro/plugins/subresourceIntegrity.d.ts +4 -0
- package/dist/runtime/nitro/plugins/subresourceIntegrity.js +19 -0
- package/dist/runtime/server/middleware/allowedMethodsRestricter.d.ts +5 -0
- package/dist/runtime/server/middleware/allowedMethodsRestricter.js +15 -0
- package/dist/runtime/server/middleware/basicAuth.d.ts +5 -0
- package/dist/runtime/server/middleware/basicAuth.js +23 -0
- package/dist/runtime/server/middleware/corsHandler.d.ts +5 -0
- package/dist/runtime/server/middleware/corsHandler.js +20 -0
- package/dist/runtime/server/middleware/csrf.d.ts +5 -0
- package/dist/runtime/server/middleware/csrf.js +28 -0
- package/dist/runtime/server/middleware/rateLimiter.d.ts +5 -0
- package/dist/runtime/server/middleware/rateLimiter.js +22 -0
- package/dist/runtime/server/middleware/requestSizeLimiter.d.ts +5 -0
- package/dist/runtime/server/middleware/requestSizeLimiter.js +17 -0
- package/dist/runtime/services/checkIsBasicAuthorized.d.ts +4 -0
- package/dist/runtime/services/checkIsBasicAuthorized.js +12 -0
- package/dist/runtime/services/checkIsChallenged.d.ts +4 -0
- package/dist/runtime/services/checkIsChallenged.js +8 -0
- package/dist/runtime/services/checkIsCsrfTokenValid.d.ts +3 -0
- package/dist/runtime/services/checkIsCsrfTokenValid.js +8 -0
- package/dist/runtime/services/checkIsEqualInConstantTime.d.ts +3 -0
- package/dist/runtime/services/checkIsEqualInConstantTime.js +11 -0
- package/dist/runtime/services/checkIsMethodAllowed.d.ts +3 -0
- package/dist/runtime/services/checkIsMethodAllowed.js +4 -0
- package/dist/runtime/services/checkIsRecord.d.ts +3 -0
- package/dist/runtime/services/checkIsRecord.js +4 -0
- package/dist/runtime/services/checkIsRequestTooLarge.d.ts +4 -0
- package/dist/runtime/services/checkIsRequestTooLarge.js +9 -0
- package/dist/runtime/services/collectSsgHashes.d.ts +5 -0
- package/dist/runtime/services/collectSsgHashes.js +41 -0
- package/dist/runtime/services/createInMemoryRateLimiterStore.d.ts +4 -0
- package/dist/runtime/services/createInMemoryRateLimiterStore.js +22 -0
- package/dist/runtime/services/generateHash.d.ts +3 -0
- package/dist/runtime/services/generateHash.js +9 -0
- package/dist/runtime/services/generateNonce.d.ts +3 -0
- package/dist/runtime/services/generateNonce.js +6 -0
- package/dist/runtime/services/generateRandomToken.d.ts +3 -0
- package/dist/runtime/services/generateRandomToken.js +8 -0
- package/dist/runtime/services/getBasicAuthCredentials.d.ts +6 -0
- package/dist/runtime/services/getBasicAuthCredentials.js +19 -0
- package/dist/runtime/services/getBasicAuthOptions.d.ts +4 -0
- package/dist/runtime/services/getBasicAuthOptions.js +17 -0
- package/dist/runtime/services/getRetryAfterSeconds.d.ts +5 -0
- package/dist/runtime/services/getRetryAfterSeconds.js +9 -0
- package/dist/runtime/services/getSecurityRules.d.ts +5 -0
- package/dist/runtime/services/getSecurityRules.js +15 -0
- package/dist/runtime/services/getSecurityState.d.ts +11 -0
- package/dist/runtime/services/getSecurityState.js +14 -0
- package/dist/runtime/services/injectNonce.d.ts +3 -0
- package/dist/runtime/services/injectNonce.js +7 -0
- package/dist/runtime/services/injectSubresourceIntegrity.d.ts +3 -0
- package/dist/runtime/services/injectSubresourceIntegrity.js +22 -0
- package/dist/runtime/services/insertContentSecurityPolicyMeta.d.ts +4 -0
- package/dist/runtime/services/insertContentSecurityPolicyMeta.js +17 -0
- package/dist/runtime/services/mergeSecurityRules.d.ts +4 -0
- package/dist/runtime/services/mergeSecurityRules.js +11 -0
- package/dist/runtime/services/readHtmlTagAttribute.d.ts +3 -0
- package/dist/runtime/services/readHtmlTagAttribute.js +8 -0
- package/dist/runtime/services/rewriteHtmlTags.d.ts +3 -0
- package/dist/runtime/services/rewriteHtmlTags.js +9 -0
- package/dist/runtime/services/securityRouteMatcher.d.ts +5 -0
- package/dist/runtime/services/securityRouteMatcher.js +11 -0
- package/dist/runtime/services/serializeBasicAuthChallenge.d.ts +3 -0
- package/dist/runtime/services/serializeBasicAuthChallenge.js +4 -0
- package/dist/runtime/services/serializeContentSecurityPolicy.d.ts +4 -0
- package/dist/runtime/services/serializeContentSecurityPolicy.js +7 -0
- package/dist/runtime/services/serializePermissionsPolicy.d.ts +4 -0
- package/dist/runtime/services/serializePermissionsPolicy.js +4 -0
- package/dist/runtime/services/serializeSecurityHeaders.d.ts +4 -0
- package/dist/runtime/services/serializeSecurityHeaders.js +19 -0
- package/dist/runtime/services/serializeStrictTransportSecurity.d.ts +4 -0
- package/dist/runtime/services/serializeStrictTransportSecurity.js +8 -0
- package/dist/runtime/services/stripHtmlTagAttribute.d.ts +3 -0
- package/dist/runtime/services/stripHtmlTagAttribute.js +5 -0
- package/dist/runtime/services/updateContentSecurityPolicy.d.ts +5 -0
- package/dist/runtime/services/updateContentSecurityPolicy.js +15 -0
- package/dist/schemas/allowedMethodsRestricterOptionsSchema.js +5 -0
- package/dist/schemas/basicAuthOptionsSchema.js +12 -0
- package/dist/schemas/contentSecurityPolicySchema.js +5 -0
- package/dist/schemas/corsHandlerOptionsSchema.js +14 -0
- package/dist/schemas/csrfOptionsSchema.js +9 -0
- package/dist/schemas/moduleOptionsSchema.js +29 -0
- package/dist/schemas/permissionsPolicySchema.js +5 -0
- package/dist/schemas/rateLimiterOptionsSchema.js +8 -0
- package/dist/schemas/requestSizeLimiterOptionsSchema.js +8 -0
- package/dist/schemas/securityHeadersSchema.js +25 -0
- package/dist/schemas/ssgOptionsSchema.js +11 -0
- package/dist/schemas/strictTransportSecurityOptionsSchema.js +9 -0
- package/dist/services/computeSubresourceIntegrityHashes.js +29 -0
- package/dist/services/formatZodIssues.js +16 -0
- package/dist/services/getDefaultModuleOptions.js +41 -0
- package/dist/services/getDefaultSecurityHeaders.js +85 -0
- package/dist/services/getPluginTemplate.js +10 -0
- package/dist/services/getRemoveLoggersViteConfig.js +4 -0
- package/dist/services/getRouteRulesTemplate.js +4 -0
- package/dist/services/getRouteSecurityRules.js +17 -0
- package/dist/services/getStaticResourceHeaders.js +12 -0
- package/dist/services/getTypeTemplate.js +25 -0
- package/dist/services/mergeModuleOptions.js +39 -0
- package/dist/services/parseModuleOptions.js +10 -0
- package/package.json +7 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-security-module",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Nuxt security module for Nitro 3 and h3 2 — security headers, a per-request nonce Content Security Policy, subresource integrity, CORS, allowed methods, basic auth and a request size limit.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jimmy Chen",
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsdown",
|
|
39
39
|
"bench": "vitest bench --run",
|
|
40
|
-
"format": "oxfmt",
|
|
41
|
-
"format:check": "oxfmt --check",
|
|
42
40
|
"lint": "eslint .",
|
|
43
41
|
"lint:fix": "eslint --fix .",
|
|
44
42
|
"test": "vitest",
|
|
@@ -52,21 +50,16 @@
|
|
|
52
50
|
"zod": "^4.6.7"
|
|
53
51
|
},
|
|
54
52
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"@esposter/
|
|
57
|
-
"@esposter/shared-node": "4.2.0",
|
|
53
|
+
"@esposter/configuration": "4.3.1",
|
|
54
|
+
"@esposter/shared-node": "4.3.1",
|
|
58
55
|
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@5x",
|
|
59
56
|
"@types/node": "^26.6.5",
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"nitro": "npm:nitro-nightly@latest",
|
|
63
|
-
"publint": "^0.3.25",
|
|
64
|
-
"tsdown": "^0.23.1",
|
|
65
|
-
"vitest": "^5.0.4"
|
|
57
|
+
"h3": "^2.0.7",
|
|
58
|
+
"tsdown": "^0.23.1"
|
|
66
59
|
},
|
|
67
60
|
"peerDependencies": {
|
|
68
|
-
"nitro": "npm:nitro-nightly@
|
|
61
|
+
"nitro": "npm:nitro-nightly@3.0.1-20261018-005730-bb9894fe",
|
|
69
62
|
"nuxt": "npm:nuxt-nightly@5x"
|
|
70
63
|
},
|
|
71
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "777a39636b789c13af33ed13370246ccf6dbaf31"
|
|
72
65
|
}
|