Creating custom donut chart with animations

This commit is contained in:
Eric Herbrandson
2019-04-23 21:58:19 -05:00
parent db079e78d0
commit 4fb8d09a01
7 changed files with 55 additions and 50 deletions

View File

@@ -8,6 +8,7 @@ const toString = require('stream-to-string');
const {Issuer} = require('openid-client');
const NODE_ENV = process.env.NODE_ENV;
const DEBUG_VERBOSE = !!process.env.DEBUG_VERBOSE;
const OIDC_CLIENT_ID = process.env.OIDC_CLIENT_ID;
const OIDC_SECRET = process.env.OIDC_SECRET;
const OIDC_URL = process.env.OIDC_URL;
@@ -34,6 +35,10 @@ const proxySettings = {
onError,
};
if (DEBUG_VERBOSE) {
proxySettings.onProxyRes = onProxyRes;
}
const app = express();
app.disable('x-powered-by'); // for security reasons, best not to tell attackers too much about our backend
app.use(logging);
@@ -76,6 +81,11 @@ function onError(err, req, res) {
console.log('Error in proxied request', err, req.method, req.url);
}
function onProxyRes(proxyRes, req, res) {
console.log('VERBOSE REQUEST', req.method, req.protocol, req.hostname, req.url, req.headers);
console.log('VERBOSE RESPONSE', proxyRes.statusCode, proxyRes.headers);
}
function handleErrors(err, req, res, next) {
console.error('An error occured during the request', err, req.method, req.url);