@nitra/cf-security 3.4.0 → 4.0.0
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 +2 -3
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitra/cf-security",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "check header in
|
|
5
|
-
"main": "src/index.js",
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "check header in serverless",
|
|
6
5
|
"type": "module",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": "./src/index.js",
|
package/src/index.js
CHANGED
|
@@ -7,7 +7,7 @@ checkEnv(['X_NITRA_CF_KEY'])
|
|
|
7
7
|
* @param {object} req - ApolloServer or Express Request for check
|
|
8
8
|
* @return {boolean} if check passed
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export default function (req) {
|
|
11
11
|
if (typeof req.headers === 'undefined') {
|
|
12
12
|
req.log.info('Request without headers')
|
|
13
13
|
return false
|