Giter VIP home page Giter VIP logo

Comments (7)

omarmeky avatar omarmeky commented on June 11, 2024

i am using https://cors-anywhere.herokuapp.com/ with port 443. I get "Not found because of proxy error: Error: connect ECONNREFUSED" when not using port 443

from cors-anywhere.

Rob--W avatar Rob--W commented on June 11, 2024

How to reproduce? curl https://cors-anywhere.herokuapp.com/ gives a succesful response.

from cors-anywhere.

omarmeky avatar omarmeky commented on June 11, 2024

https://cors-anywhere.herokuapp.com/api.bufferapp.com/1/profiles.json?access_token=[for security purposes I emailed you this]

I performed a GET request and got: "Not found because of proxy error: Error: connect ECONNREFUSED." Note that I successfully made that request via JSONP.

from cors-anywhere.

Rob--W avatar Rob--W commented on June 11, 2024

Reproduced error on the live server.
When I launch a local instance of Cors Anywhere (on localhost:8080, node server.js), the API call completes successfully.
When I create a new Heroku instance, the API call also works as intended.
Did you make an excessive number of API calls to buffer? Perhaps they've (temporarily) blocked my server.

Try out https://cors-anywhere-eu.herokuapp.com/. The source code is identical to cors-anywhere.herokuapp.com, but it's hosted in Europe instead of the US. To try out:

  1. Visit https://robwu.nl/cors-anywhere.html.
  2. Open the JavaScript console and set cors_api_url = 'http://cors-anywhere-eu.herokuapp.com/';
  3. Paste the URL in the textbox at the top and click on GET.

from cors-anywhere.

omarmeky avatar omarmeky commented on June 11, 2024

Ok, that does indeed work. When I use the European server in Fiddler, however, I still get the error (Not found because of proxy error: Error: connect ECONNREFUSED). Do you have any idea why this happens?

image

from cors-anywhere.

Rob--W avatar Rob--W commented on June 11, 2024

It appears that the Buffer API cannot be accessed over http. Calling the Buffer API without any proxies also results in an error if you use http:

$ curl -vv 'http://api.bufferapp.com/1/profiles.json?access_token=[api key here]' -H 'X-Requested-With: Whatever'
* Hostname was NOT found in DNS cache
* Adding handle: conn: 0x7ca560
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7ca560) send_pipe: 1, recv_pipe: 0
*   Trying 54.225.178.31...
* connect to 54.225.178.31 port 80 failed: Connection refused
* Failed to connect to api.bufferapp.com port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to api.bufferapp.com port 80: Connection refused

To solve the problem, don't omit the scheme (https) and use the full URL.

https://cors-anywhere-eu.herokuapp.com/https://api.bufferapp.com/1/profiles.json?access_token=[api key here]

from cors-anywhere.

omarmeky avatar omarmeky commented on June 11, 2024

That works! I think they changed something recently since I used to be able to use a proxy without adding the scheme. Nevertheless, I appreciate your help.

from cors-anywhere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.