pwa icon indicating copy to clipboard operation
pwa copied to clipboard

Access-Control error in service worker

Open jimmyff opened this issue 7 years ago • 3 comments

After using my app for a while my HTTP requests start failing (with an XHR Error), if I inspect the service worker I can see this error in the console:

Request header field x-ijt is not allowed by Access-Control-Allow-Headers in preflight response.

If I delete the service worker my HTTP requests start going through correctly.

jimmyff avatar Jun 27 '17 15:06 jimmyff

Just had the issue again, not sure if these help but see attached screenshots below. This is when when running on Dartium -I'm not sure if the issue also exists on Chrome.

screen shot 2017-06-28 at 15 01 13

screen shot 2017-06-28 at 15 01 22

jimmyff avatar Jun 28 '17 14:06 jimmyff

@jimmyff: is there a simple to use http endpoint I could use for reproducing the issue?

isoos avatar Jul 16 '17 07:07 isoos

It seems like IDE support plugin adds "x-ijt" header to all requests which makes them fail if server responds with "Access-Control-Allow-Headers".

Just allow x-ijt at server-side.

shsun avatar Aug 14 '19 01:08 shsun