-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
How do setup an own server with cors-anywhere #217
Comments
Are you sending a request from a web page at the same origin? If so (and the answer is most likely yes because of the absence of the For more background, see https://github.com/Rob--W/cors-anywhere/issues/39#issuecomment-387690291 |
Thanks for the quick reply Rob,
which still gives me a I am able to deploy your app on a heroku instance (as its just plug&play, thanks for that). Any ideas on how to get it to work on AWS? |
Open the browser's developer tools, switch to the network tab and watch the requests. If you cannot make sense of it (e.g. when the actual response is not shown), right-click on the request and copy the request as a From that you should be able to tell whether the 403 error is generated by CORS Anywhere or the actual response from the proxied request. |
The response is
|
If you don't want to use whitelisting (i.e. you want to allow any origin to make requests through your proxy), then don't assign any value to the origin whitelist. |
Ok that is good to hear. if i explicitly whitelist localhost I do not get any response back but the error
|
You need to remove If you still have the same shell from where you've run the above commands, use |
I did remove So what would be minimal working example to make it run locally? As I said I am appending
build the docker image from Dockerfile
with
WITHOUT setting any Following your answers, this setup should work. Any Idea what I am missing here? ---EDIT:
|
The request header is missing. Try something like: |
I am behind a corporate proxy, but proxy environment variables are set and normally i got internet access through the console / terminal. but your command gave a
|
Hi, have setup cors-anywhere using Cpanel in a hosted environment. I do not have the possibility to access port 8080. How do I set it up so that I dont get the message "Not found because of proxy error: Error: getaddrinfo ENOTFOUND https https:80"? The application is currently running in the root folder. Any help would be much appreciated! Best Regards |
Hi, would you be open to a one-click deploy being added to the repo so others can launch on Heroku or DigitalOcean? It seems from #301 that Heroku might not be desirable as it might upset them. I Could do the same for Digitalocean, as at least people will have to pay for their own hosting. But maybe it's not something you are interested in? (This offer is for @Rob--W not anyone else) |
@Lewiscowles1986 If you have instructions to set them it up, just post the details in a new issue so people can find it. |
Hello Guys, Appreciate if there are any updates on this? We would like to host CORs Anywhere on my subdomain. Appreciate any pointers on getting this addressed. Thanks in advance! |
I Forked (totally unmaintained) https://github.com/Lewiscowles1986/cors-anywhere I got political with some of the naming and I don;t think Rob was particularly interested to have my input https://github.com/Rob--W/cors-anywhere/pulls?q=is%3Apr+is%3Aclosed+author%3ALewiscowles1986 has PR's |
The README references documentation at Heroku on setting up a Node.js project, at https://github.com/Rob--W/cors-anywhere#demo-server. It's not as convenient as a one-click deploy. There has been a PR to implement one-click deploy (by @Lewiscowles1986), which hasn't been merged yet because it was closed before the review feedback at https://github.com/Rob--W/cors-anywhere/issues/320#issuecomment-804394875 was addressed. I wanted to credit @Lewiscowles1986 for the one-click deploy patch, but if the fork is unmaintained with no interest of opening a new PR, then I could create a new set of commits myself. |
i have test with 2 api where its one have cors and one dont have. |
There is not enough information here to tell what's going on. This kind of question (about the received response) has been asked several times, search on this issue tracker for the message for existing issues. |
Please i have read virtually every comment on this page, but i still cant find the best solution. Browser is responding with the same issue using "https://cors-anywhere.herokuapp.com/http://localhost:5000/api/products" |
did you have try with change http to https on localhost ? |
localhost on the proxy's end is generally not the same as localhost in the browser. You cannot use the proxy to load from localhost because the proxy server cannot read your localhost server. |
Dear @ Rob--W I want your help. |
CORS Anywhere does not support proxying of WebSocket connections. |
Dear @Rob--W but when running frontend server, I have error I mentioned in above message. |
Have u tried downloading the the Cors access control plugins on chrome extension? It worked just fine for me. |
In the past work, I have tried. But it was not working well. It is urgent problem. |
Dear @Rob--W |
@lovelyBestDev There is not enough in your comments to help you. The issue could potentially be caused by your destination server ignoring requests from your server. |
Amazing work @Rob--W. Could you please help me by telling what to do if I need to deploy this server on Netlify? I tried a lot but may be I am missing something small. Also there is no help available on the internet for this. Thanks |
@cpt-davidoff If you are running the app from your cPanel hosted website, you should use the default port by setting the port to '443' for https://example.com, or '80' for http://example.com. |
Dear @Rob--W thank you very much for your work, it's a really helpful tool!
One Thing I could not handle yet is to setup an own server to run cors-anywhere.
My Plan was to build it as Docker Image and run it in a container on the same server that my website is running which uses cors-anywhere to make API Calls.
Can you help me with the setup?
As I think this might be interesting for many cors-anywhere users!
My Setup so far:
Server with IP: 12.123.123.12 running a website accessible on Port 80
Docker Container build from your repository with Dockerfile:
and started on the server with the command:
I tried different things for
CORSANYWHERE_WHITELIST
likelocalhost
,127.0.0.1
or12.123.123.12
with this setup i am able to reach
localhost:8080
to see the following messagebut when i try to make API calls with this url prefix i am always getting the same error as response:
I also tried this setup running on my local machine which also does not work.
I am pretty sure that I am just missing a simple thing, if you could help me with this, it would be really great!
The text was updated successfully, but these errors were encountered: