🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

rest-easy-loki

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-easy-loki - npm Package Compare versions

Comparing version

to
0.7.3

4

dist/api.js

@@ -48,3 +48,3 @@ "use strict";

if (config.cors) {
console.log('Enabling CORS.');
console.log('Enabled CORS.');
// api.use(cors({ credentials: true }));

@@ -73,3 +73,3 @@ api.use(cors());

api.use(upload_service_1.uploadService(uploadPath));
console.log(`Uploading files enabled: POST to /upload/:CONTEXT and the files will be saved in ${uploadPath}.`);
console.log(`Enabled file uploads: POST to /upload/:CONTEXT and the files will be saved in ${uploadPath}.`);
}

@@ -76,0 +76,0 @@ const router = routes_1.createRouter(ss ? ss.io : undefined);

@@ -9,3 +9,3 @@ "use strict";

exports.createSocketService = (api) => {
console.log('Enabling SOCKET.IO: subscribe to COLLECTION or COLLECTION/:ID to receive update notifications.');
console.log('Enabled SOCKET.IO: subscribe to COLLECTION or COLLECTION/:ID to receive update notifications.');
const server = http_1.default.createServer(api.callback());

@@ -12,0 +12,0 @@ // const options = cors ? { origins: '*:*'} : undefined;

@@ -13,3 +13,3 @@ "use strict";

exports.uploadService = (uploadPath) => async (ctx, next) => {
if ('POST' !== ctx.method && !/^\/upload\//.test(ctx.path)) {
if (ctx.method !== 'POST' || !/^\/upload\//.test(ctx.path)) {
return await next();

@@ -16,0 +16,0 @@ }

{
"name": "rest-easy-loki",
"version": "0.7.2",
"version": "0.7.3",
"description": "A REST interface for lokijs supporting CRUD operations and automatic creation of new collections.",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet