vuejs-templates / pwa

PWA template for vue-cli based on the webpack template
MIT License
3.04k stars 506 forks source link

Cloudflare's Under Attack Mode breaks Service Worker #197

Closed daniandl closed 5 years ago

daniandl commented 6 years ago

We use SocketIO on our site. Once we activate Under Attack mode on Cloudflare, the Service Worker can't be fetched (in the network tab of devtools). The socket connection returns a 503 as well which prevents our web app from loading.

Users have to unregister the service worker locally to be able to access the website, which is a massive turn off for us. We can't disable UAM mode at times where we are hit with a DDOS attack. On top of that UAM tends to invalidate the user's "trustworthiness" after a while which restarts this cycle as well.

We've had similar issues with MIME type errors when loading the service worker which requires people to do a double or triple refresh, which sort of has me thinking it could be a server caching problem but we have set the service worker file and all the required files to not be cached.

Please help me figure this out :)