use text/plain on /api/metrics

This commit is contained in:
Danny Coates 2019-02-15 11:59:39 -08:00
parent b30be6e4a2
commit 8eaacfea18
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
4 changed files with 11 additions and 5 deletions

View file

@ -1,5 +1,5 @@
const crypto = require('crypto');
const express = require('express');
const bodyParser = require('body-parser');
const helmet = require('helmet');
const uaparser = require('ua-parser-js');
const storage = require('../storage');
@ -69,7 +69,8 @@ module.exports = function(app) {
res.set('Cache-Control', 'no-cache');
next();
});
app.use(express.json());
app.use(bodyParser.json());
app.use(bodyParser.text());
app.get('/', language, pages.index);
app.get('/oauth', language, pages.blank);
app.get('/legal', language, pages.legal);