New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

moleculer-web

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer-web - npm Package Compare versions

Comparing version

to
0.6.0-beta5

37

CHANGELOG.md

@@ -27,6 +27,7 @@ <a name="0.6.0"></a>

settings: {
// Global middlewares. Applied to all routes.
use: [
cookieParser()
],
// Global middlewares. Applied to all routes.
use: [
cookieParser(),
helmet()
],

@@ -40,13 +41,17 @@ routes: [

compression(),
passport.initialize(),
passport.session(),
serveStatic(path.join(__dirname, "public"))
],
aliases: {
"GET /secret": [
// Alias-level middlewares
auth.isAuthenticated(),
auth.hasRole("admin"),
"top.secret" // Call the `top.secret` action
]
}
],
aliases: {
"GET /secret": [
// Alias-level middlewares
auth.isAuthenticated(),
auth.hasRole("admin"),
"top.secret" // Call the `top.secret` action
]
}
}

@@ -67,4 +72,4 @@ ]

responseHeaders: {
"Content-Disposition": "attachment; filename=\"data.csv\"",
"Content-Type": "text/csv"
"Content-Disposition": "attachment; filename=\"data.csv\"",
"Content-Type": "text/csv"
},

@@ -71,0 +76,0 @@ handler() {

{
"name": "moleculer-web",
"version": "0.6.0-beta4",
"version": "0.6.0-beta5",
"description": "Official API Gateway service for Moleculer framework",

@@ -54,3 +54,3 @@ "main": "index.js",

"peerDependencies": {
"moleculer": ">= 0.10.0"
"moleculer": ">= 0.11.0"
},

@@ -57,0 +57,0 @@ "dependencies": {

@@ -408,3 +408,3 @@ /*

req.locals = req.locals || {};
res.locals = res.locals || {};
this.logRequest(req);

@@ -492,3 +492,8 @@

}
} else if (route.mappingPolicy == MAPPING_POLICY_RESTRICT) {
// Blocking direct access
return this.send404(req, res);
}
actionName = actionName.replace(/\//g, ".");

@@ -495,0 +500,0 @@

@@ -1325,2 +1325,30 @@ "use strict";

});
describe("'restrict' option without aliases", () => {
beforeAll(() => {
[ broker, service, server] = setup({
routes: [
{
path: "/",
mappingPolicy: "restrict"
}
]
});
broker.loadService("./test/services/math.service");
});
it("GET /test", () => {
return request(server)
.get("/test")
.expect(404);
});
it("GET /math/add", () => {
return request(server)
.get("/math/add")
.expect(404);
});
});
});

@@ -1327,0 +1355,0 @@