fix(web): self-destructing sw.js to evict the stale GoDaddy Airo worker
All checks were successful
Deploy to Production / deploy (push) Successful in 1m0s

The domain was parked on GoDaddy Airo, which registered a Workbox
service worker. It keeps serving cached GoDaddy pages in browsers that
visited the parked domain. Serving a self-destruct sw.js makes those
browsers wipe the caches and unregister the worker on their next visit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Marco Sadjadi 2026-05-21 23:06:56 +02:00
parent cc3c5ad444
commit 2e5bf5b44b

23
apps/web/public/sw.js Normal file
View File

@ -0,0 +1,23 @@
// Self-destructing service worker.
//
// buildmymcpserver.com previously ran on GoDaddy Airo, which installed a
// Workbox service worker that pre-cached GoDaddy's pages. That worker keeps
// serving stale GoDaddy content in browsers that visited the parked domain.
// Our app does not use a service worker — this file exists only so that when
// such a browser checks sw.js for an update it receives this script, which
// wipes the caches and unregisters itself.
self.addEventListener('install', () => self.skipWaiting());
self.addEventListener('activate', (event) => {
event.waitUntil(
(async () => {
const keys = await caches.keys();
await Promise.all(keys.map((k) => caches.delete(k)));
await self.registration.unregister();
const clients = await self.clients.matchAll({ type: 'window' });
for (const client of clients) {
client.navigate(client.url);
}
})(),
);
});