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

peer

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peer - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

extensions/memcached/package.json

20

lib/server.js

@@ -195,2 +195,22 @@ var util = require('./util');

/** Hack from https://github.com/mcavage/node-restify/issues/284, until we switch to express */
function unknownMethodHandler(req, res) {
if (req.method.toLowerCase() === 'options') {
var allowHeaders = ['Accept', 'Accept-Version', 'Content-Type', 'Api-Version'];
if (res.methods.indexOf('OPTIONS') === -1) res.methods.push('OPTIONS');
res.header('Access-Control-Allow-Credentials', true);
res.header('Access-Control-Allow-Headers', allowHeaders.join(', '));
res.header('Access-Control-Allow-Methods', res.methods.join(', '));
res.header('Access-Control-Allow-Origin', req.headers.origin);
return res.send(204);
} else {
return res.send(new restify.MethodNotAllowedError());
}
}
this._app.on('MethodNotAllowed', unknownMethodHandler);
// Retrieve guaranteed random ID.

@@ -197,0 +217,0 @@ this._app.get(this._options.path + ':key/id', function(req, res, next) {

2

lib/util.js

@@ -43,3 +43,3 @@

res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.setHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');

@@ -46,0 +46,0 @@

{
"name": "peer",
"version": "0.2.6",
"version": "0.2.7",
"description": "PeerJS server component",

@@ -5,0 +5,0 @@ "main": "lib/server.js",

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