Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS is preventing the request #54

Closed
vvzen opened this issue Jun 13, 2018 · 13 comments
Closed

CORS is preventing the request #54

vvzen opened this issue Jun 13, 2018 · 13 comments

Comments

@vvzen
Copy link

vvzen commented Jun 13, 2018

The script was running fine until today.

Failed to load resource: Origin http://mywebsite.com is not allowed by Access-Control-Allow-Origin.

Tested under Safari and Firefox.

github-loader-error

@IonicaBizau
Copy link
Member

@izuzak Can you please take a look at this?

@vvzen In the meantime, you can setup a different proxy, following the docs. Urlreq is just the default one.

@izuzak
Copy link

izuzak commented Jun 13, 2018

@izuzak Can you please take a look at this?

@IonicaBizau Happy to take a look when I find a moment. Can you please open an issue with clear steps to reproduce? 🙏

@IonicaBizau
Copy link
Member

IonicaBizau commented Jun 13, 2018

Well, actually it's because Over Quota 🙈

Over Quota
This application is temporarily over its serving quota. Please try again later.

And because that response doesn't have the CORS headers, the error appears in the browser.
To reproduce, open: https://urlreq.appspot.com/req?method=GET&url=https://github.com/IonicaBizau

@izuzak
Copy link

izuzak commented Jun 13, 2018

And because that response doesn't have the CORS headers, the error appears in the browser.
To reproduce, open: https://urlreq.appspot.com/req?method=GET&url=https://github.com/IonicaBizau

Problem solved, then 😄 You can spin up your own instance of that server (the code is open source) and buy additional quota for yourself.

@IonicaBizau
Copy link
Member

Indeed 😅

@IonicaBizau
Copy link
Member

Going to close this for now. The solution is to use a custom proxy if you don't want to depend on the default proxy.

@ghjansen
Copy link

ghjansen commented Aug 19, 2019

This issue is happening again.

Going to close this for now. The solution is to use a custom proxy if you don't want to depend on the default proxy.

@IonicaBizau any directions on how to do that?
There are free alternative proxies that can be used?
This issue is a big downside when using your project.

@ghjansen
Copy link

To whom it might concern, @Cipher-Coder did a great step-by-step on how to get izuzak/urlreq running through Google Cloud. See it in full at izuzak/urlreq#6.

Despite the moderate complexity of this workaround, it seems that a better solution is still much needed. Thoughts?

@IonicaBizau
Copy link
Member

I remember I saw a pretty nice proxy service, but I don't remember its name and since I really enjoyed using @izuzak's tool, I just decided to use it.

The library accepts the proxy option:

GitHubCalendar(".calendar", "your-username", {
  responsive: true,
  proxy: function (url) {
      return "https://the-proxy-domain.com/req?method=GET&url=" + url;
   }
});

The url returned by the proxy function can be any endpoint from your server side of your app (e.g. a php file or Express endpoint etc).

@Funkh0user
Copy link

I'm having the qouta problems described in this thread but i'm uncertain how to implement the solutions talked about. could someone explain to me in more detail what the exact workaround for this is? When I tried use the proxy method above, It didn't solve my problems.

@hayorov
Copy link

hayorov commented Apr 5, 2020

I'm also confirming that urlreq.appspot.com is under "Over Quota". izuzak/urlreq#7

@Funkh0user
Copy link

its back up again. I'd still love a more detailed explanation on how to use a custom proxy or to acquire more qouta.

@IonicaBizau
Copy link
Member

In the latest releases I implemented the new proxy from @Bloggify. Currently there are no max quotas, but using the default cache is recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants