mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Allow users to choose whether or not to reveal the provenance of the data to consumers. This is intended to help protect data rights to portability and access. If consumers start abusing or discriminating against Nightscout users due to the source of the data, this allows users to conceal this information.
37 lines
870 B
JavaScript
37 lines
870 B
JavaScript
'use strict';
|
|
|
|
var wares = {
|
|
sendJSONStatus : require('./send-json-status'),
|
|
bodyParser : require('body-parser'),
|
|
compression : require('compression'),
|
|
obscureDeviceProvenance: require('./obscure-provenance')
|
|
};
|
|
|
|
function extensions (list) {
|
|
return require('./express-extension-to-accept')(list);
|
|
}
|
|
|
|
function configure (env) {
|
|
return {
|
|
sendJSONStatus: wares.sendJSONStatus( ),
|
|
bodyParser: wares.bodyParser,
|
|
jsonParser: wares.bodyParser.json({
|
|
limit: '1Mb',
|
|
}),
|
|
urlencodedParser: wares.bodyParser.urlencoded({
|
|
limit: '1Mb',
|
|
extended: true,
|
|
parameterLimit: 50000
|
|
}),
|
|
rawParser: wares.bodyParser.raw({
|
|
limit: '1Mb'
|
|
}),
|
|
compression: wares.compression,
|
|
extensions: extensions,
|
|
obscure_device: wares.obscureDeviceProvenance(env)
|
|
};
|
|
}
|
|
|
|
configure.wares = wares;
|
|
module.exports = configure;
|