From 2fdb19f93345636960e79ad0f87b61f898ca4287 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 22 Jan 2020 10:55:54 +0100 Subject: [PATCH] fix: exclude force from key closes #37 --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2d227b1..7e8fda4 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,9 @@ function isEmpty (value) { const _getKey = ({ req }) => { const url = new URL(req.url, 'http://localhost').toString() const { origin } = new URL(url) - const baseKey = normalizeUrl(url) + const baseKey = normalizeUrl(url, { + removeQueryParameters: ['force', /^utm_\w+/i] + }) return baseKey.replace(origin, '').replace('/?', '') }