Skip to content

Commit

Permalink
Økte Umami pageSize til 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
eilifjohansen committed Feb 4, 2025
1 parent fa928d0 commit 04fe50d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 04fe50d

Please sign in to comment.