Django and service workers - serve “sw.js” at application's root url
问题 So I'm building a Django progressive web app with offline support using service workers. According to google's documentation, the sw.js file should be at the root of the app's url: You need to do this because the scope of a service worker (the set of urls that the ServiceWorker will load for) is defined by the directory where it resides. At the moment, I'm serving all static assets from http://example.com/static/ folder. But I need to serve this specific file at a url like: http://example.com