Skip to content

Commit

Permalink
Merge pull request #152 from igobranco/igobranco/fix-cors
Browse files Browse the repository at this point in the history
fix: CORS issue while fetch assets
  • Loading branch information
0xMurage authored Jul 16, 2024
2 parents 30e645e + 5c33534 commit 4159a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function urlPath(path: string): string {

export async function getJSON<T>(url: string,requestOptions?: RequestInit): Promise<T> {
if(!requestOptions){
requestOptions = {credentials: 'include'}
requestOptions = {credentials: 'same-origin'}
}
const res = await fetch(url,requestOptions);
return res.json();
Expand Down

0 comments on commit 4159a02

Please sign in to comment.