ZomoXYZ / Discord-Bot-Client

Use your Bot User as a Normal User
Other
139 stars 87 forks source link

CORS #27

Open VueDevOps opened 4 years ago

VueDevOps commented 4 years ago

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?

CatboyCoding commented 4 years ago

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

yuta0801 commented 4 years ago

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