- From: AnthumChris <notifications@github.com>
- Date: Fri, 17 Jan 2020 12:03:00 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 17 January 2020 20:03:08 UTC
Should HTTP `OPTIONS` requests be accessible and available within a SW's fetch event?
`OPTIONS` requests are currently reported as `GET` requests even though the browser sends an HTTP `OPTIONS` request.
**sw.js**
```js
self.addEventListener("fetch", function (event) {
console.log(event.request.method, event.request.url);
});
```
**app.js**
```js
navigator.serviceWorker.register('./sw.js')
fetch('https://example.com', {
headers: {
'force-cors-preflight': 'foo'
}
});
```
--
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/1498
Received on Friday, 17 January 2020 20:03:08 UTC