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

Trying to set up cors-anywhere on FTP server

Open beccaking opened this issue 5 years ago • 1 comments

Hi Rob, I'm trying to set up a version of cors-anywhere that can run on my own server, and I'm still getting the "No 'Access-Control-Allow-Origin' header is present on the requested resource" error and a failed post request. The API call works when I use your live version on Heroku.

I cloned the site and moved that folder into my site's main public_html folder, and I'm seeing the right cors-anywhere files at that URL. Right now, I have the post request made to www.http://myFTPhostsite.com/cors-anywhere/https://www.theapi.com?variables=correct

Is there a step I missed in here somewhere?

beccaking avatar Apr 02 '20 18:04 beccaking

CORS Anywhere is a Node.js application. A FTP server just serves files.

You need to upload the CORS Anywhere application to a server (=hardware/runtime environment) that launches the CORS Anywhere server (=application) via Node.js. Take a look at the README, which shows an example via Heroku.

Rob--W avatar Apr 03 '20 13:04 Rob--W