From 18f75595dad58f9743506726f432766171f6af48 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Mon, 19 Jun 2023 03:28:55 +0200 Subject: [PATCH] Added GraphiQL disable. --- config/default.js | 1 + ecosystem.config.js | 1 - src/web/postgraphile.js | 2 +- src/web/server.js | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/default.js b/config/default.js index be16962c..ea95d965 100755 --- a/config/default.js +++ b/config/default.js @@ -13,6 +13,7 @@ module.exports = { database: 'traxxx', }, timeout: 5000, + graphiql: false, }, web: { host: '0.0.0.0', diff --git a/ecosystem.config.js b/ecosystem.config.js index e9e3495e..15391d25 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -2,7 +2,6 @@ module.exports = { apps: [ - // LEAFS { name: 'traxxx', script: 'src/init.js', diff --git a/src/web/postgraphile.js b/src/web/postgraphile.js index f5e79b7b..45210b9e 100755 --- a/src/web/postgraphile.js +++ b/src/web/postgraphile.js @@ -27,7 +27,7 @@ function initPostgraphile(credentials) { // watchPg: true, disableDefaultMutations: true, dynamicJson: true, - graphiql: true, + graphiql: config.database.graphiql, enhanceGraphiql: true, allowExplain: () => true, // simpleCollections: 'only', diff --git a/src/web/server.js b/src/web/server.js index ce8cf989..6828eed3 100755 --- a/src/web/server.js +++ b/src/web/server.js @@ -72,6 +72,7 @@ async function initServer() { const store = new KnexSessionStore({ knex }); app.set('view engine', 'ejs'); + app.disable('x-powered-by'); router.use('/media', express.static(config.media.path)); router.use(express.static('public'));