Giter VIP home page Giter VIP logo

Comments (14)

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

How do you know that your own instance is not working? What does the network tab of the console say?

What do you see when you use curl, e.g. as follows? If there is any error caused by the configuration, you will get a descriptive 4xx error.

curl https://cors-anywhere.herokuapp.com/http://example.com -vvv -H 'Origin: anything'

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

Same curl command...

from your demo server:

  • Connected to cors-anywhere.herokuapp.com (xxx) port xxx (#0)
  • TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • Server certificate: *.herokuapp.com
  • Server certificate: DigiCert SHA2 High Assurance Server CA
  • Server certificate: DigiCert High Assurance EV Root CA

GET /https://blog.caixabank.es/logo.jpg HTTP/1.1
Host: cors-anywhere.herokuapp.com
User-Agent: curl/7.43.0
Accept: /
Origin: anything

< HTTP/1.1 200 OK

From mine:

  • Connected to mysite.com (xxx) port 80 (#0)

GET /https://blog.caixabank.es/logo.jpg HTTP/1.1
Host: mysite.com
User-Agent: curl/7.43.0
Accept: /
Origin: anything

< HTTP/1.1 404 Not Found

It is running on WebFaction as node js app, but if needed I guess I could switch to Heroku.

Any help would be very appreciated.

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

As you can see my website is not on HTTPS, if this makes a difference.

from cors-anywhere.

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

If you perform a direct request to https://blog.caixabank.es/logo.jpg from the server where you are running your instance of CORS Anywhere, do you get the expected response? It is possible that the other server just serves different responses based on IP (if so, then the issue is independent of CORS Anywhere).

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

curl from the server works successfully :S

from cors-anywhere.

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

Wait.

I had an old instance of cors-anywhere used for proof of concept.

Which version of CORS Anywhere are you using? Are you using the latest version?

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

yes, I deleted all the files, put the latest from the zip and install node modules again. v.0.4.0

from cors-anywhere.

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

After following the following steps,

  1. Run CORS Anywhere with the default settings, i.e. clone the repo and run node server.js
  2. Visit https://robwu.nl/cors-anywhere.html
  3. Open the console and run cors_api_url = "http://localhost:8080/"
    (change the value to the URL of your proxy, don't forget the trailing slash)
  4. Put https://blog.caixabank.es/logo.jpg in the top box ("Url to be fetched").
  5. Click on the GET button.

I see a meaningful response (both in the output field and the network tab of the devtools). Do you see the same when you try it with your proxy?

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

works on my local machine, not on my hosting (same 404 error) :S I guess I should try with heroku.

from cors-anywhere.

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

Other things to check are the Node.js versions, and whether the external libraries are matching.
If you zip the CORS Anywhere directory on your server and run it locally, is the issue still showing up?

If all else fails you can also create a network capture (e.g. using tshark) on the server and compare the result with what you're observing locally. If you are not sure how to analyze the packet capture, feel free to mail it to me.

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

Drama, created new application on my hosting with node 6.9.2 and still same issue. I will switch to Heroku.

from cors-anywhere.

nuthinking avatar nuthinking commented on June 11, 2024

Heroku worked!

from cors-anywhere.

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

I guess that the issue is caused by the network configuration on your original host. If you have any more information, then please post it.

Until then, I'll close this issue since there is nothing that I can do here.

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.