Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonapi-server

Package Overview
Dependencies
Maintainers
5
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonapi-server - npm Package Compare versions

Comparing version 1.15.1 to 1.15.2

2

CHANGELOG.md

@@ -0,1 +1,3 @@

- 2016-07-06 - v1.15.2
- 2016-07-06 - CORS headers are now applier further up the middleware chain
- 2016-07-05 - v1.15.1

@@ -2,0 +4,0 @@ - 2016-07-05 - Fixed bug when deleting singular relationships via deep urls

34

lib/router.js

@@ -23,2 +23,19 @@ /* @flow weak */

app.use(function(req, res, next) {
res.set({
"Content-Type": "application/vnd.api+json",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PATCH, DELETE, OPTIONS",
"Access-Control-Allow-Headers": req.headers["access-control-request-headers"] || "",
"Cache-Control": "private, must-revalidate, max-age=0",
"Expires": "Thu, 01 Jan 1970 00:00:00"
});
if (req.method === "OPTIONS") {
return res.status(204).end();
}
return next();
});
app.use(function(req, res, next) {
if (!req.headers["content-type"] && !req.headers.accept) return next();

@@ -55,19 +72,2 @@

app.use(function(req, res, next) {
res.set({
"Content-Type": "application/vnd.api+json",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PATCH, DELETE, OPTIONS",
"Access-Control-Allow-Headers": req.headers["access-control-request-headers"] || "",
"Cache-Control": "private, must-revalidate, max-age=0",
"Expires": "Thu, 01 Jan 1970 00:00:00"
});
if (req.method === "OPTIONS") {
return res.status(204).end();
}
return next();
});
app.use(bodyParser.json());

@@ -74,0 +74,0 @@ app.use(bodyParser.urlencoded({ extended: true }));

{
"name": "jsonapi-server",
"version": "1.15.1",
"version": "1.15.2",
"description": "A config driven NodeJS framework implementing json:api",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc