Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept regexp #20

Closed
beatrizdemiguelperez opened this issue Mar 17, 2016 · 2 comments
Closed

Accept regexp #20

beatrizdemiguelperez opened this issue Mar 17, 2016 · 2 comments

Comments

@beatrizdemiguelperez
Copy link

It would be a nice if the addon accepts a regExp in the includePaths parameter of config/environment:
with output toolbox.router.any(/google.com/, toolbox.cacheFirst);

@jkleinsc
Copy link
Owner

@beatrizdemiguelperez I agree. I think it can added for the next release

@jkleinsc
Copy link
Owner

@beatrizdemiguelperez this is now available in the new version (0.1.0). Regular Expressions can now be used for the new cacheFirstURLs, cacheOnlyURLs, fastestURLs and networkFirstURLs options. For your use case, you would specify the following:

cacheFirstURLs: [
  /google.com/
]
OR
cacheFirstURLS: [{
  route: /google.com/,
  options: {
    origin: 'https://www.google.com/'
  }
}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants