From 398958c4722b2c8bb6de5a168493dd2111858cc0 Mon Sep 17 00:00:00 2001 From: Jordan Dalby Date: Wed, 23 Oct 2024 22:36:31 +0100 Subject: [PATCH] Add trust proxy setting to app.js --- server/src/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/app.js b/server/src/app.js index fee04cf..c0a1241 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -10,6 +10,8 @@ const port = process.env.PORT || 5000; app.use(bodyParser.json()); app.use(express.static(path.join(__dirname, '../../client/build'))); +app.set('trust proxy', true); + app.use('/api/snippets', snippetRoutes); app.get('*', (req, res) => {