This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Description
One thing I'm not comfortable doing with service workers is caching opaque responses. In any other caching layer I would never consider caching responses without checking if they were good, but opaque responses allow no access to the success of the response. This is the default scenario when seeking to cache requests for cross domain scripts, styles and images... a significant portion of the requests I'd like to cache.
This utility https://github.com/Financial-Times/n-service-worker/blob/master/src/utils/handlers.js#L5-L13 gives the ability to upgrade requests to cors, though can only be applied to domains where I have control over the cors headers.
Could something similar be of use in sw-toolbox?