Refined-github: `bypass-checks` fails when cors is needed

Created on 2 Apr 2020  ·  6Comments  ·  Source: sindresorhus/refined-github

https://github.com/sindresorhus/eslint-plugin-unicorn/pull/654 (or any pull there)

Access to fetch at 'https://codecov.io/gh/sindresorhus/eslint-plugin-unicorn/compare/b2838fdff7ecdc71008e049c9b1ad57da11aa224...2abde3bbf93d00305d0e85701c4b7be383fa9ed7' from origin 'https://github.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
refined-github.js:4104 ❌ Refined GitHub → bypass-checks → TypeError: Failed to fetch 
bug help wanted

All 6 comments

Maybe it just needs this?

set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

We are not talking about that rule, right?

~Null~ No :)

Maybe it just needs this?

set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

fetchDom does not take another parameter

It should just be part of it: if url.origin !== location.origin, add no-cors

It should just be part of it: if url.origin !== location.origin, add no-cors

Of where? Fetchdom?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sompylasar picture sompylasar  ·  3Comments

fregante picture fregante  ·  3Comments

olso picture olso  ·  3Comments

vanniktech picture vanniktech  ·  3Comments

sindresorhus picture sindresorhus  ·  3Comments