You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
I created the following rule using toolbox with a custom handler. toolbox.router.get('/user/test', function(request) { return new Response('It works! ' + request.url); },{ origin: 'http://local.testserver:10000' });
It only works after i reload the page twice. The first time, it send the request to the network , but if i reload the page, i get the correct response from service worker
The text was updated successfully, but these errors were encountered:
importScripts("/assets/js/sw-toolbox.js")
// Only works after reloading page, also tested with any instead of post
toolbox.router.post('/contact', function(request, values, options){
console.log("INTERCEPTED POST REQUEST");
return new Response("OK");
})
// Has no influence on whether the route above works or not
toolbox.router.default = toolbox.cacheFirst;
Any ideas on why this is happening? I've tried with and without the companion script to load the service worker. I'm using the last released version 3.6.1.
Thanks
Jasper
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I created the following rule using toolbox with a custom handler.
toolbox.router.get('/user/test', function(request) { return new Response('It works! ' + request.url); },{ origin: 'http://local.testserver:10000' });
It only works after i reload the page twice. The first time, it send the request to the network , but if i reload the page, i get the correct response from service worker
The text was updated successfully, but these errors were encountered: