mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Fix form parsing
This commit is contained in:
@@ -502,6 +502,8 @@ function init (client, $) {
|
||||
|
||||
$.ajax({
|
||||
method: 'POST'
|
||||
, dataType: 'json'
|
||||
, contentType: 'application/json'
|
||||
, url: '/api/v1/treatments/'
|
||||
, headers: client.headers()
|
||||
, data: data
|
||||
|
||||
+5
-3
@@ -26,6 +26,8 @@ function create (env, ctx) {
|
||||
var appInfo = env.name + ' ' + env.version;
|
||||
app.set('title', appInfo);
|
||||
app.enable('trust proxy'); // Allows req.secure test on heroku https connections.
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
var insecureUseHttp = env.insecureUseHttp;
|
||||
var secureHstsHeader = env.secureHstsHeader;
|
||||
if (!insecureUseHttp) {
|
||||
@@ -244,11 +246,11 @@ function create (env, ctx) {
|
||||
|
||||
app.use("/clock", clockviews);
|
||||
|
||||
app.use('/api', bodyParser.json({limit: '50mb'}), apiRoot);
|
||||
app.use('/api', apiRoot);
|
||||
|
||||
app.use('/api/v1', bodyParser.json({limit: '50mb'}), api);
|
||||
app.use('/api/v1', api);
|
||||
|
||||
app.use('/api/v2', bodyParser.json({limit: '50mb'}), api);
|
||||
app.use('/api/v2', api);
|
||||
|
||||
app.use('/api/v2/properties', ctx.properties);
|
||||
app.use('/api/v2/authorization', ctx.authorization.endpoints);
|
||||
|
||||
Reference in New Issue
Block a user