Added support for setting bodyParser limit param via environment variable (#1618)
In the NodeJs environment, the body-parser was set to 1MB, this change makes it configurable with an env variable.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
const process = require("process");
|
||||
|
||||
module.exports = async function (context) {
|
||||
let message =
|
||||
"BODY_PARSER_LIMIT received from env variable " +
|
||||
process.env.BODY_PARSER_LIMIT;
|
||||
return {
|
||||
status: 200,
|
||||
body: message,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "fission-nodejs-bodyParser-example",
|
||||
"version": "0.1.0",
|
||||
"author": "Rahul Bhati",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Rahul Bhati",
|
||||
"email": "rjbhati009@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Nodejs example for setting bodyParser limit param via environment variable",
|
||||
"engines": {
|
||||
"node": ">=7.6.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
Reference in New Issue
Block a user