From 9c06f8eab1d57a3deab2b40ee9c1b25e24aa9275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindre=20Dahl=20L=C3=B8ken?= Date: Fri, 9 Aug 2024 12:02:18 +0200 Subject: [PATCH] prov igjen --- server/src/proxy/api-proxy.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/src/proxy/api-proxy.ts b/server/src/proxy/api-proxy.ts index e568e0994..fb9b9ecd9 100644 --- a/server/src/proxy/api-proxy.ts +++ b/server/src/proxy/api-proxy.ts @@ -20,13 +20,11 @@ const setup = (app: Express, audience: string) => { res.status(401).send(); }); - app.use('/tiltaksgjennomforing/api/kodeverk', (req, res, next) => { - console.log('api/kodeverk'); - next(); - }); - app.use('/tiltaksgjennomforing/api', (req, res, next) => { console.log('apiProxy /tiltaksgjennomforing/api'); + if (req.path === '/tiltaksgjennomforing/api/kodeverk') { + next(); + } if (!req.headers['authorization']) { res.status(401).send(); } else {