mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-02-14 17:49:55 +00:00
Creating custom donut chart with animations
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user