morrislaptop / WebpackDevServerValetDriver

11 stars 8 forks source link

valet's nginx is caching the servicer-worker.js, how to prevent this? #8

Closed vesper8 closed 6 years ago

vesper8 commented 6 years ago

Wondering how to prevent this without manually editing the nginx generated file.

As a result of the service-worker.js being cached I have to go into the debugger's application tab and manually 'clear storage' after each deployment

this is how I handle not caching the service worker on production:

location = /service-worker.js {
    expires off;
    add_header Cache-Control no-cache;
    access_log off;
}
morrislaptop commented 6 years ago

I don't think this can be solved by the scope of this library...