Open marcoscaceres opened 8 years ago
To be clear, the header needs to be on the sw.js file, and the value of the header needs to be:
Service-Worker-Allowed: "/"
got it
Added in quick-and-dirty deploy automation:
https://github.com/oyiptong/qnd-rnt-automation/commit/d54c4596a37c5cd8bd8559061d34b7044b4c8b1e
note: we expect the Service Worker files to end with sw.js
Fancy Python is fancy!
Sent from my iPhone
On Nov 3, 2015, at 3:52 AM, Olivier Yiptong notifications@github.com wrote:
Added in quick-and-dirty deploy automation:
oyiptong/qnd-rnt-automation@d54c459
— Reply to this email directly or view it on GitHub.
I thinks that's a very reasonable assumption:+1:
Sent from my iPhone
On Nov 3, 2015, at 3:53 AM, Olivier Yiptong notifications@github.com wrote:
note: we expect the Service Worker files to end with sw.js
— Reply to this email directly or view it on GitHub.
hmm S3 doesn't let us use that header yet:
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html
sadness... looks like we'll have to stick with sw.js being co-located with the html file
Sad😢 ok, I'll move those commits to another branch for when they add it.
Sent from my iPhone
On Nov 3, 2015, at 6:38 AM, Olivier Yiptong notifications@github.com wrote:
hmm S3 doesn't let us use that header yet:
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html
— Reply to this email directly or view it on GitHub.
it looks like our CDN supports custom headers, however:
We can move off of S3 if we wanted to.
We can make that a v2 bug. We'd handle the serving of the files on our own. And Cloudfront would pick up the headers
Google Cloud Storage also doesn't seem to support custom headers: https://cloud.google.com/storage/docs/reference-headers
I can't really figure out Azure Object Storage.
Worse comes to worse, we have our own instance of Nginx serving static files. It will be cheap.
Rackspace also doesn't allow for custom headers:
The CDN needs to make sure it allows sw.js to be loaded from the
js
folder by declaring the "Service-Worker-Allowed:" HTTP header.