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

Error: getaddrinfo ENOTFOUND https https:80 #167

Closed
geovannefduarte opened this issue Apr 22, 2019 · 4 comments
Closed

Error: getaddrinfo ENOTFOUND https https:80 #167

geovannefduarte opened this issue Apr 22, 2019 · 4 comments

Comments

@geovannefduarte
Copy link

Hi,
Due the limitation of number of requests per period I'm trying to host cors-anywhere on my server.
Since my application runs on 8080, I've changed the port to run on 8888 and proxy passed on nginx (https://my-website.com/cors/).

The issue is that when I put the protocol on the URL I get the following error Not found because of proxy error: Error: getaddrinfo ENOTFOUND https https:80

For GET requests works perfectly if I don't put the protocol on the URL, for example:
Returns correctly: GET - https://my-website.com/cors/api.cartolafc.globo.com/esquemas
Returns error: GET - https://my-website.com/cors/https://api.cartolafc.globo.com/esquemas

Unfortunately I can't use request without the protocol because when I send POST request I receive the error Not found because of proxy error: Error: getaddrinfo ENOTFOUND https https:80. Without the protocol, the request are been made using GET, which returns status code 405 since the API expect an POST request.
Returns error: POST - https://my-website.com/cors/https://api.cartolafc.globo.com/esquemas
Returns error: POST - https://my-website.com/cors/api.cartolafc.globo.com/esquemas (request upgrade to GET)

Do you have any thoughts on what I'm missing?

Thanks in advance

@Rob--W
Copy link
Owner

Rob--W commented Apr 23, 2019

It seems that your nginx configuration converts double slashes to one slash.
You haven't shown your nginx config, but since it happens very often, I think that your problem can be fixed by following the instructions at https://github.com/Rob--W/cors-anywhere/issues/143#issuecomment-452468128

@geovannefduarte
Copy link
Author

Indeed, that was the problem
Thank you so much and keep up the great work =)

@pradeepsathyan
Copy link

pradeepsathyan commented Feb 23, 2020

Hi,
I am having the same issue on Windows Server which I am using Nodejs run as Reverse Proxy.
Here is the error code : "Not found because of proxy error: Error: getaddrinfo ENOTFOUND https"

I have tried every possible ways couldn't found any solution.

Thanks

@madhav411
Copy link

madhav411 commented Feb 18, 2021

Hi,
I am trying to setup the cors-anywhere in my K8s Cluster.I used this docker-image for cors-anywhere setup i.e; testcab/cors-anywhere and i don't know what are the variables that i have to set to make it work. Can you please help me [I am a newbie to nodejs]

Thanks

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

4 participants