-
Notifications
You must be signed in to change notification settings - Fork 388
supporting multiple stripPrefix & replacePrefix entries via stripPrefixMulti #138
supporting multiple stripPrefix & replacePrefix entries via stripPrefixMulti #138
Conversation
…ths to another directory (i.e. server sends foo/file.txt for requests to bar/file.txt, as well as caching bar/other-file.txt)
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
/me has signed the CLA, but wondering why it doesn't use oauth for account association (using an email other than my google email address here) |
CLAs look good, thanks! |
Any ETA on this? See #141 |
As per #142 (comment), I think this can be closed without merging, correct? |
I've implemented the method described in my comment on 142 |
Unfortunately, one test for the existing Could you please ensure that the implementation addresses backwards compatibility, as confirmed by the test? Additionally, it would be much appreciated if you could add a new test along the same lines for the new option. |
if ( | ||
params.stripPrefix !== '' && | ||
params.replacePrefix !== '' && | ||
Object.keys(params.stripPrefixMulti).indexOf(params.stripPrefix) === -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using params.stripPrefix in params.stripPrefixMulti
would be more concise.
Thanks, @SignpostMarv! 👍 from me, and this will be rolled into the upcoming 4.x release. |
The environment that I'm tinkering in with sw-precache at the moment maps requests to public/foo.txt to public-precached/foo.txt while public/bar.txt is where it says it is;
Example config:
Thoughts/comments?