Skip to content

Commit

Permalink
try cors fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lakhoune committed Sep 11, 2023
1 parent 8009713 commit 88d56db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/statistics/canvas-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ class CanvasStatsOverlay extends LitElement {
const url = `${config.pm4botsEndpoint}/bot/${botName}/enhanced-model`;
console.log(url);
try {
const response = await fetch(url, { mode: "no-cors", timeout: 10000 });
const response = await fetch(url, {
mode: "no-cors",
timeout: 10000,
headers: {
"Access-Control-Allow-Origin": "*",
"Content-Type": "application/json",
},
});
if (!response.ok) {
this.loading = false;
return;
Expand Down

0 comments on commit 88d56db

Please sign in to comment.