From 3be15e71cbc2d000ef163336ba0605f0be112021 Mon Sep 17 00:00:00 2001 From: nune <145225213+gigirassy@users.noreply.github.com> Date: Thu, 19 Dec 2024 19:12:43 -0500 Subject: [PATCH] Update app.js --- app.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app.js b/app.js index 60205c5..0f7cab1 100644 --- a/app.js +++ b/app.js @@ -1,10 +1,18 @@ const express = require('express'); const fetch = require('node-fetch'); +const cookieParser = require('cookie-parser'); const app = express(); const PORT = process.env.PORT || 3000; app.use(express.static('public')); +app.use(cookieParser()); + +const autoCopyDefault = process.env.AUTO_COPY_DEFAULT === 'false'; + +app.get('/auto-copy-default', (req, res) => { + res.json({ autoCopyDefault }); +}); // Route to handle raw Pastebin requests app.get('/:pasteId', async (req, res) => {