Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Commit

Permalink
remove lodash dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
abepetrillo committed Feb 29, 2016
1 parent 3ca657a commit aaa2b96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ var http = require('http'),
port = process.env.PORT || 8080,
allowedOriginalHeaders = new RegExp('^' + require('./allowedOriginalHeaders.json').join('|'), 'i'),
allowedRequestHeaders = require('./allowedRequestHeaders.json'),
_ = require('lodash'),
bannedUrls = new RegExp(require('./bannedUrls.json').join('|'), 'i'),
defaultOptions = {
gzip:true
Expand Down Expand Up @@ -85,7 +84,7 @@ var http = require('http'),
return str.toLowerCase();
}
//add headers from original request
for ( var header of _.map(allowedRequestHeaders, toLower)) {
for ( var header of allowedRequestHeaders.map(toLower)) {
opts.headers[header] = req.headers[header]
}
return opts
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
},
"license": "MIT",
"dependencies": {
"request": "^2.40.0",
"lodash": "latest"
"request": "^2.40.0"
},
"keywords": [
"cors",
Expand Down

0 comments on commit aaa2b96

Please sign in to comment.