Comparing version 0.5.4 to 0.6.0
17
index.js
@@ -67,2 +67,19 @@ var http = require('http'), | ||
if (req.headers.origin) { | ||
res.setHeader('Access-Control-Allow-Origin', '*') | ||
if (req.method == 'OPTIONS') { | ||
if (req.headers['access-control-request-headers']) | ||
res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers']) | ||
if (req.headers['access-control-request-method']) | ||
res.setHeader('Access-Control-Allow-Methods', req.headers['access-control-request-method']) | ||
res.setHeader('Access-Control-Max-Age', 172800) | ||
res.setHeader('Content-Length', 0) | ||
req.removeAllListeners() | ||
return res.end() | ||
} | ||
} | ||
var contentType = req.headers['content-type'] | ||
@@ -69,0 +86,0 @@ |
{ | ||
"name": "dynalite", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"description": "A mock implementation of Amazon's DynamoDB built on LevelDB", | ||
@@ -5,0 +5,0 @@ "main": "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
130353
3251