Discord-Bot-Client icon indicating copy to clipboard operation
Discord-Bot-Client copied to clipboard

CORS

Open VueDevOps opened this issue 5 years ago • 2 comments

Access to XMLHttpRequest at 'http://discord.com/api/v6/experiments' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

i'm guessing this is dead now then?

VueDevOps avatar Aug 08 '20 01:08 VueDevOps

If you have FireFox:

  1. Go to about:config
  2. Find "strict_origin_policy"
  3. Disable it.

If you have Chrome:

  1. Close Chrome.
  2. Launch Chrome directly with "[PATH_TO_CHROME]\chrome.exe" --disable-web-security

CatboyCoding avatar Aug 10 '20 10:08 CatboyCoding

This app seems using electron not for web, would not working on browser.

Electron needs to add webPreferences: { webSecurity: false } to BrowserWindow options below for disable cors. https://github.com/ZomoXYZ/Discord-Bot-Client/blob/ddf13605aba9bb65147d0934bb4e8e2d83f2a274/main.js#L38-L41

yuta0801 avatar Aug 10 '20 11:08 yuta0801