From 5b723bd2cc1e184735de9e5bc85914323a36e6d2 Mon Sep 17 00:00:00 2001 From: Ignacio Cordoba Date: Fri, 26 Oct 2018 18:14:42 -0400 Subject: [PATCH] Changing regExp with broader validation I was having problems with the url validation using the RegExp (using c9.io). I changed the url rule to focus on the pathname and it worked. I thought you might be interested in this small fix. Great job! --- solution/app/sw.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/app/sw.js b/solution/app/sw.js index 6a5f215..38df9af 100644 --- a/solution/app/sw.js +++ b/solution/app/sw.js @@ -40,7 +40,7 @@ if (workbox) { }); workbox.routing.registerRoute( - /\/api\/add/, + ({url}) => url.pathname === "/api/add", networkWithBackgroundSync, 'POST' );