MyBitFoundation / MyBit-DDF.website

🔷 The MyBit Decentralised Development Fund Website
https://ddf.mybit.io
GNU General Public License v3.0
2 stars 17 forks source link

Use CORS in GitHub API requests #131

Closed bookmoons closed 5 years ago

bookmoons commented 5 years ago

The Developer section of the current site has failing requests to the GitHub API, with a CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://github.mybit.io/api/issues. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://github.mybit.io/api/issues. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://github.mybit.io/api/issues. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://github.mybit.io/api/issues. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
..

For me this prevents even loading the Developer section. It happens on the live site and on a local dev server.

CORS should be added to requests to the GitHub API.

bookmoons commented 5 years ago

Hi guys. I started toward implementing some of the bounties for the DDF site. But I can't even get the Developer section open because of this issue. It keeps sending failed requests forever too, so I wonder if GitHub might actually ban an IP if someone left the page open.

Would like to propose a bounty of 2500 MYB to get CORS added.

bookmoons commented 5 years ago

Maybe this was a network problem. Tried it again and it started working, live and local.

bookmoons commented 5 years ago

For reference about what happened, looks like it was CloudFlare not liking my VPN. Requests to the GitHub proxy would throw up a captcha and show up as 403 responses. No data could be loaded.

0xjjpa commented 5 years ago

@bookmoons interesting, might be worth to turn it off at some point