From 04fe50d3906b2814e4b0be924368a4c5d99efd80 Mon Sep 17 00:00:00 2001 From: EIlif Johansen Date: Tue, 4 Feb 2025 09:21:57 +0100 Subject: [PATCH] =?UTF-8?q?=C3=98kte=20Umami=20pageSize=20til=201000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 89cc30e..253f382 100644 --- a/index.js +++ b/index.js @@ -61,6 +61,11 @@ app.get('/siteimprov*', (req, res) => { app.get('/umami/api/*', (req, res) => { let apiUrl = "https://umami.intern.nav.no/api"; req.url = req.url.replace(/\/umami\/api/, ''); + + // Append pageSize=1000 to the URL + const separator = req.url.includes('?') ? '&' : '?'; + req.url += `${separator}pageSize=1000`; + if (req.url.match(/users/)) { res.end("APIet har blitt blokkert av Team ResearchOps i NAV, ta kontakt med oss for hjelp."); } else {