@vue-storefront/middleware
Advanced tools
Comparing version 2.5.12-c.5 to 2.5.12
@@ -197,3 +197,3 @@ 'use strict'; | ||
} }, (config.helmet || {})); | ||
var isHelmetEnabled = config.helmet || (config.helmet && Object.keys(config.helmet).length > 0) || false; | ||
var isHelmetEnabled = config.helmet === true || (config.helmet && Object.keys(config.helmet).length > 0); | ||
if (isHelmetEnabled) { | ||
@@ -200,0 +200,0 @@ app.use(helmet__default["default"](options)); |
@@ -185,3 +185,3 @@ import express from 'express'; | ||
} }, (config.helmet || {})); | ||
var isHelmetEnabled = config.helmet || (config.helmet && Object.keys(config.helmet).length > 0) || false; | ||
var isHelmetEnabled = config.helmet === true || (config.helmet && Object.keys(config.helmet).length > 0); | ||
if (isHelmetEnabled) { | ||
@@ -188,0 +188,0 @@ app.use(helmet(options)); |
@@ -20,3 +20,3 @@ const { createServer } = require('@vue-storefront/middleware'); | ||
app.use(cors()); | ||
const isHelmetEnabled = moduleOptions.helmet || (moduleOptions.helmet && Object.keys(moduleOptions.helmet).length > 0) || false; | ||
const isHelmetEnabled = moduleOptions.helmet === true || (moduleOptions.helmet && Object.keys(moduleOptions.helmet).length > 0); | ||
if (isHelmetEnabled) { | ||
@@ -44,3 +44,3 @@ app.use(helmet(options)); | ||
const config = require(this.nuxt.options.rootDir + '/middleware.config.js'); | ||
const config = require(`${this.nuxt.options.rootDir}/middleware.config.js`); | ||
const handler = createServer(config); | ||
@@ -47,0 +47,0 @@ const serverMiddleware = { path: `/${apiPath}`, handler }; |
{ | ||
"name": "@vue-storefront/middleware", | ||
"version": "2.5.12-c.5", | ||
"version": "2.5.12", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.cjs.js", |
@@ -39,5 +39,5 @@ import express, { Request, Response, Express } from 'express'; | ||
}, | ||
...(config.helmet || {}) | ||
...(config.helmet || {}) as HelmetOptions | ||
}; | ||
const isHelmetEnabled = config.helmet || (config.helmet && Object.keys(config.helmet).length > 0) || false; | ||
const isHelmetEnabled = config.helmet === true || (config.helmet && Object.keys(config.helmet).length > 0); | ||
if (isHelmetEnabled) { | ||
@@ -44,0 +44,0 @@ app.use(helmet(options)); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4981518
1