CORB

I am getting a CORB error whenever I try to read connection data. No sure what config option if any I need to tweak on the OneAll admin panel.

Below is my code (sans the setting of the auth tokens for security):

const parameters = location.search.substring(1).split("&"),
pairs = parameters.map(item => item.split("=")),
connection_token = (pairs.filter(([key,_]) => key==="connection_token")[0]||[])[1];

const url = https://anywhichwaygithubio.api.oneall.com/connections/${connection_token}.json;

console.log(url);

fetch(url,{mode:"no-cors"}) // auth headers removed for this example
.then(response => response)
.then(response => response.json()) // error thrown here
.then(json => {
console.log(json); // expect connection data here
})

Best Answer

  • Answer ✓

    This has been resolved. the no-cors mode was introduced to overcome a different issue and was causing the readblock. Removing the no-cors resolved the problem.

Answers

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.