You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a simple web application with https://leetcode-stats-api.herokuapp.com/<username> call inside.
Host it in GitHub pages.
Open it in browser
Expected behavior
Call should be valid and 200 status code should be returned with response body.
Actual behavior
503 error is returned and the following error is printed in console:
Access to fetch at 'https://leetcode-stats-api.herokuapp.com/johndoe' from origin 'https://johndoe.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Recommendation for fix
Allow CORS requests from https://*.github.io.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
https://leetcode-stats-api.herokuapp.com/<username>
call inside.Expected behavior
Call should be valid and 200 status code should be returned with response body.
Actual behavior
503 error is returned and the following error is printed in console:
Recommendation for fix
Allow CORS requests from
https://*.github.io
.The text was updated successfully, but these errors were encountered: