- From: Ricky Miller <notifications@github.com>
- Date: Wed, 09 Jan 2019 11:08:07 +0000 (UTC)
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 9 January 2019 11:08:30 UTC
You're right; that would be better. My point is not so much that it's a *good* thing to have a path matching multiple domains, but having something like `pathStartsWith` isn't necessarily creating a new problem. I know I could get my example to work using `RouterIfURLStarts` and `RouterIfURL` (or whatever equivalent API you decide to go with), so I think the conditions in your current draft are sufficient for a v1, but having conditions for each part of a request (`href`, `protocol`, `hostname`, `pathname`, `search`, `method`, and `headers`) would be nice to have. To go even deeper, I'd love to be able to do something like ```javascript router.add( new RouterNot(new RouterConditionHasCookie('I_AM_LOGGED_IN')), new RouterSourceCache({ request: '/login.html' }) ) ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1373#issuecomment-452659185
Received on Wednesday, 9 January 2019 11:08:30 UTC