#Request trouble

3 messages · Page 1 of 1 (latest)

broken kite
#

I made the programm in which you can kick a player even if you aren't online. It is very comfortable
I got problem which I can't solve so far
Access to XMLHttpRequest at 'https://lichess.org/team/chess-mordor/kick/baltiyskaya' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

slate hamlet
#

Oh no, CORS. Fyi it means Cross-Origin Request System and it prevents a website from accessing another for security reasons. It's very hard to get around.

An example CORS case

Your bank has an URL /transfer/{account}/{amount} to transfer money, and you are authenticated via a cookie. A malicious website could make a request using XMLHttpRequest and since it's your computer and you're authentified the money could be transfered. This is the reason why CORS exists among many other security considerations.