@saasquatch/program-boilerplate 3.7.2-2 → 3.7.2-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -68,16 +68,6 @@ function webtask(program = {}) {
|
|
|
68
68
|
app.use(express_1.default.json({ limit: process.env.MAX_PAYLOAD_SIZE || "1mb" }));
|
|
69
69
|
app.use(compression());
|
|
70
70
|
app.use(logger_3.httpLogMiddleware(logger));
|
|
71
|
-
// Enforce HTTPS. The server does not redirect http -> https
|
|
72
|
-
// because OWASP advises not to
|
|
73
|
-
app.use((req, res, next) => {
|
|
74
|
-
if (process.env.NODE_ENV === "production" &&
|
|
75
|
-
req.header("X-Forwarded-Proto") !== "https") {
|
|
76
|
-
return res.status(403).send({ message: "SSL required" });
|
|
77
|
-
}
|
|
78
|
-
// allow the request to continue if https is used
|
|
79
|
-
next();
|
|
80
|
-
});
|
|
81
71
|
const healthCheck = (_req, res) => res.status(200).json({ status: "OK" });
|
|
82
72
|
app.get("/healthz", healthCheck);
|
|
83
73
|
app.get("/livez", healthCheck);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/program-boilerplate",
|
|
3
|
-
"version": "3.7.2-
|
|
3
|
+
"version": "3.7.2-4",
|
|
4
4
|
"description": "Boilerplate for writing programs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@saasquatch/jsonata-paths-extractor": "^1.0.1",
|
|
36
|
-
"@saasquatch/logger": "^1.
|
|
36
|
+
"@saasquatch/logger": "^1.1.2-0",
|
|
37
37
|
"bson-objectid": "^1.3.1",
|
|
38
38
|
"compression": "^1.7.4",
|
|
39
39
|
"express": "^4.17.1",
|