Comparing version 11.1.3 to 11.1.4
@@ -1,6 +0,5 @@ | ||
"use stict"; | ||
"use strict"; | ||
var url = require("url"); | ||
var path = require("path"); | ||
var cookie = require("cookie"); | ||
var excludeList = require("./exclude"); | ||
@@ -39,18 +38,30 @@ var utils = exports; | ||
var parsed = cookie.parse(rawCookie, { | ||
decode: function(val) { | ||
// Prevent values from being decodeURIComponent transformed | ||
return val; | ||
} | ||
}); | ||
var objCookie = (function () { | ||
// simple parse function (does not remove quotes) | ||
var obj = {}; | ||
var pairs = rawCookie.split(/; */); | ||
var pairs = | ||
Object.keys(parsed) | ||
.filter(function (item) { | ||
return item !== "domain"; | ||
}) | ||
.map(function (key) { | ||
return key + "=" + parsed[key]; | ||
}); | ||
pairs.forEach( function( pair ) { | ||
var eqIndex = pair.indexOf("="); | ||
// skip things that don't look like key=value | ||
if (eqIndex < 0) { | ||
return; | ||
} | ||
var key = pair.substr(0, eqIndex).trim(); | ||
obj[key] = pair.substr(eqIndex + 1, pair.length).trim(); | ||
}); | ||
return obj; | ||
})(); | ||
var pairs = Object.keys(objCookie) | ||
.filter(function (item) { | ||
return item !== "domain"; | ||
}) | ||
.map(function (key) { | ||
return key + "=" + objCookie[key]; | ||
}); | ||
if (rawCookie.match(/httponly/i)) { | ||
@@ -244,2 +255,2 @@ pairs.push("HttpOnly"); | ||
}; | ||
}; | ||
}; |
{ | ||
"name": "foxy", | ||
"version": "11.1.3", | ||
"version": "11.1.4", | ||
"description": "Proxy with response modding", | ||
@@ -29,3 +29,2 @@ "main": "index.js", | ||
"connect": "^3.3.5", | ||
"cookie": "^0.1.3", | ||
"dev-ip": "^1.0.1", | ||
@@ -40,2 +39,3 @@ "eazy-logger": "^2.0.0", | ||
"babel": "^4.7.16", | ||
"cookie": "^0.1.3", | ||
"browser-sync": "^2.3.1", | ||
@@ -42,0 +42,0 @@ "chai": "^2.1.2", |
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
18875
7
549
16
- Removedcookie@^0.1.3
- Removedcookie@0.1.5(transitive)