Re: [w3c/ServiceWorker] Scope matching algorithm breaks sites that don't end in a slash (#1272)

GitHub kinda does both.

https://jakearchibald.github.io/thing.txt and https://jakearchibald.github.io/thing.txt/ are different resources.

> And especially given that many servers have directory-based policies it seems potentially dangerous to allow for this escape

Absolutely.

```js
navigator.serviceWorker.register('/thing/sw.js', {
  treatScopeLikeFilesystemPath: true
});
```

The above would require a service worker that could be scoped to `/thing`. Unless `Service-Worker-Allowed` is used, the default maximum scope would be applied, which is `/thing/`, so it would reject.

-- 
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/1272#issuecomment-366209590

Received on Friday, 16 February 2018 11:19:16 UTC