electrode-csrf-jwt
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -18,3 +18,3 @@ "use strict"; | ||
function createToken() { | ||
const id = uuid.v1(); | ||
const id = uuid.v4(); | ||
const headerPayload = {type: "header", uuid: id}; | ||
@@ -51,3 +51,4 @@ const cookiePayload = {type: "cookie", uuid: id}; | ||
if (req.method === "POST") { | ||
const method = req.method.toUpperCase(); | ||
if (method !== "GET" && method !== "HEAD") { | ||
return verifyAndCreateToken(); | ||
@@ -54,0 +55,0 @@ } |
@@ -21,3 +21,3 @@ "use strict"; | ||
function createToken() { | ||
const id = uuid.v1(); | ||
const id = uuid.v4(); | ||
const headerPayload = {type: "header", uuid: id}; | ||
@@ -66,3 +66,4 @@ const cookiePayload = {type: "cookie", uuid: id}; | ||
if (request.method === "post") { | ||
const method = request.method.toUpperCase(); | ||
if (method !== "GET" && method !== "HEAD") { | ||
return verifyAndCreateToken(); | ||
@@ -69,0 +70,0 @@ } |
{ | ||
"name": "electrode-csrf-jwt", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17603
390