diff --git a/package.json b/package.json index 39edb110..28313ab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt-security", - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", "type": "module", "exports": { diff --git a/src/runtime/server/middleware/xssValidator.ts b/src/runtime/server/middleware/xssValidator.ts index 348702dd..7cc7ae7a 100644 --- a/src/runtime/server/middleware/xssValidator.ts +++ b/src/runtime/server/middleware/xssValidator.ts @@ -7,7 +7,7 @@ const securityConfig = useRuntimeConfig().security export default defineEventHandler(async (event) => { if (['POST', 'GET'].includes(event.req.method!!)) { const valueToFilter = event.req.method === 'GET' ? getQuery(event) : readBody(event) - const xssValidator = new FilterXSS(securityConfig.xss.value) + const xssValidator = new FilterXSS(securityConfig.xssValidator.value) const stringifiedValue = JSON.stringify(valueToFilter) const processedValue = xssValidator.process(JSON.stringify(valueToFilter)) if (processedValue !== stringifiedValue) {