cors-anywhere icon indicating copy to clipboard operation
cors-anywhere copied to clipboard

Has anyone gotten this working on Microsoft Azure? If so what ports should we be listening on and what headers should we remove?

Open uhlenkott opened this issue 7 years ago • 10 comments

uhlenkott avatar Sep 07 '17 21:09 uhlenkott

Wondering also... Just installed it on Azure and I get a 500 error...

cadilhac avatar Jan 31 '18 15:01 cadilhac

I got it finally working. Azure was selecting a very old node version... However I still have a minor issue (SO link). This requests creates error 500 and no error appears in the logs:

https://myserver.azurewebsites.net/http://www.remoteserver.com/query=john

This one runs fine:

https://myserver.azurewebsites.net/www.remoteserver.com/query=john

cadilhac avatar Jan 31 '18 19:01 cadilhac

@cadilhac Your question on SO has been answered, so I will add another note: you were using CORS Anywhere on a Windows server, where : is disallowed by default in a path name (this is probably a mitigation to avoid vulnerabilities surrounding alternate data streams, CVE-1999-0278). The recommended solution is to run CORS Anywhere on Linux (or if you want to stick to Windows+IIS, allow : in IIS, but after doing so, verify that you aren't introducing a security vulnerability by doing so).

Lastly, note that omitting "http://" is not equivalent to http:. If the scheme is not specified, CORS Anywhere will default to the scheme that was used for the original request, https in the case of https://myserver.azurewebsites.net/www.remoteserver.com/query=john

Rob--W avatar Feb 04 '18 17:02 Rob--W

Thanks Rob.

And if my web site is http, but I use

http://myserver.azurewebsites.net/www.remoteserver.com:443/query=john

it will do the trick, right?

cadilhac avatar Feb 04 '18 17:02 cadilhac

Yes. But there is a colon in your URL again.

Rob--W avatar Feb 04 '18 17:02 Rob--W

Yes, but strangely, it works. Are you sure this is not ':/' that is forbidden?

cadilhac avatar Feb 04 '18 18:02 cadilhac

I built a docker container with nothing except cors-anywhere, using node 10.14.2 as base. I run that locally and it works as expected.

I then upload that docker container to a container registry, ask Azure to Webapp (linux based) to use that container. It deployed successfully and seems to be running. However, when it tried to serve any request, it always return 404. Looks like it is Azure outbound network issue.....Any suggestion on how to get this fixed? Thank you

chrischip avatar Dec 28 '18 23:12 chrischip

Please look at the PR if you want to deploy this to Azure. This patch will make it work there

#146

chrischip avatar Dec 29 '18 22:12 chrischip

Has anybody got this to work in Azure yet? I have the same issue.

jamiemaguiredotnet avatar Jul 10 '19 08:07 jamiemaguiredotnet

Has anybody got this to work in Azure yet? I have the same issue.

my PR was rejected. However you are welcome to look at my change and fork your own branch...

https://github.com/Rob--W/cors-anywhere/pull/146/commits/049bb95ec578c3d80d8cc72ca4fbd556f74808ce

chrischip avatar Jul 10 '19 14:07 chrischip