mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
Use modified body-parser accepting YAML
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
const http = require('http');
|
||||
const express = require('express');
|
||||
express.yaml ??= require('body-parser').yaml; // NOTE: Use own customised body-parser
|
||||
const cookieParser = require('cookie-parser')
|
||||
|
||||
const maybeSendAlert = require("../lib/alerts");
|
||||
@@ -31,6 +32,7 @@ app.map = function(a, route){
|
||||
};
|
||||
|
||||
app.use(express.json({type: "application/json", strict: false, limit: '10mb'}));
|
||||
app.use(express.yaml({type: "application/yaml", limit: '10mb'}));
|
||||
app.use(express.urlencoded({ type: "application/x-www-form-urlencoded", extended: true }));
|
||||
app.use(express.text({type: "text/*", limit: '10mb'}));
|
||||
app.use((req, res, next) => {
|
||||
|
||||
1095
lib/www/server/package-lock.json
generated
1095
lib/www/server/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,7 @@
|
||||
"linux"
|
||||
],
|
||||
"dependencies": {
|
||||
"body-parser": "gitlab:aaltronav/contrib/expressjs/body-parser",
|
||||
"cookie-parser": "^1.4.5",
|
||||
"debug": "^4.3.4",
|
||||
"express": "^4.17.1",
|
||||
|
||||
Reference in New Issue
Block a user