You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have a cros error like this Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’.
usually, when use cdn like cloudfront, we set the ‘Access-Control-Allow-Origin’ is ‘*’. But if Credential is 'include' with Fetch API, the protocol do not support.
So i think the code here:
exportfunctionpriority(url){// TODO: Investigate using preload for high-priority// fetches. May have to sniff file-extension to provide// valid 'as' values. In the future, we may be able to// use Priority Hints here.//// As of 2018, fetch() is high-priority in Chrome// and medium-priority in Safari.returnwindow.fetch ? fetch(url,{credentials: `include`}) : viaXHR(url);}
to
exportfunctionpriority(url){// TODO: Investigate using preload for high-priority// fetches. May have to sniff file-extension to provide// valid 'as' values. In the future, we may be able to// use Priority Hints here.//// As of 2018, fetch() is high-priority in Chrome// and medium-priority in Safari.returnwindow.fetch ? fetch(url,{credentials: `omit`}) : viaXHR(url);}
What do you think with it?
The text was updated successfully, but these errors were encountered:
XhmikosR
changed the title
Can change the credentials from ‘include’ to 'omit'?
Can change the credentials from 'include' to 'omit'?
Apr 20, 2023
Hi, I have a cros error like this
Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’
.usually, when use cdn like
cloudfront
, we set the ‘Access-Control-Allow-Origin’ is ‘*’. But if Credential is 'include' with Fetch API, the protocol do not support.So i think the code here:
to
What do you think with it?
The text was updated successfully, but these errors were encountered: