From dddd292d30a3f7f051845c7be103c458ec403874 Mon Sep 17 00:00:00 2001 From: b1ek Date: Mon, 6 Mar 2023 00:39:42 +1000 Subject: [PATCH] add fake dotenv --- routes/fakes.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 routes/fakes.js diff --git a/routes/fakes.js b/routes/fakes.js new file mode 100644 index 0000000..16c605f --- /dev/null +++ b/routes/fakes.js @@ -0,0 +1,32 @@ +const Helpers = require('../helpers'); +const handler = require('express-async-handler'); + +// this is sent if some wise ass performs GET /.env +async function dotenv(req, res) { + res.header('Content-Type', 'text/plain'); + res.send( + 'APP_URL=http://blek.codes\n' + + 'APP_PORT=http,80;https,443\n' + + 'APP_DEBUG=true\n' + + '\n' + + 'DB_PASSWORD=i_am_transfem_uwu\n' + + 'DB_HOST=db-central.blek.codes\n' + + 'DB_PORT=44839\n' + + 'DB_TABLE=uwu\n' + + '\n' + + '# TODO: Change SSH password\n' + + 'SSH_USERNAME=blek\n' + + 'SSH_PASSWORD=coolpass123\n' + + 'SSH_HOSTNAME=blek.codes\n' + + 'SSH_PORT=22\n' + + '\n' + + + // eof new line + + '\n' + ); +} + +module.exports = (router) => { + router.get('/.env', handler(dotenv)); +} \ No newline at end of file