cors-anywhere
cors-anywhere copied to clipboard
No Server Response (Repl.it)
Problem
Hi! I'm trying to make a daily wallpaper website, but am running across a problem when trying to host cors-anywhere from Repl.it.
The page loads here, but there is no server response for URLs.
Cors' Code

Script Evocation

I would greatly appreciate any help with figuring out how to make cors-anywhere work on Repl.it. Thank you!
The URLs are all formatted to https:/www., and I noticed this comment and confirmed the forward-slash shortening with this suggestion. I'm not sure how I would begin applying a solution to repl.it though.
I just imported the repo without changes via repl.it, and it works just fine (verified by using curl to load http://localhost:8080/https://example.com).
Side note: Do not remove requireHeader from the configuration. It is very insecure to do so because it would allow others to load third-party websites in your domain.
@Rob--W Would you be able to share your repl? Even after cloning the repository into repl.it, the server refuses to process the URLs.
https://repl.it/repls/InsubstantialExtrovertedPixels
Install dependencies and start server from shell:
npm ci
node server.js &
Test request:
curl http://localhost:8080/http://example.com/anywhere -H 'Origin: http://example.net'
@Rob--W This is interesting... curling from the repl.it terminal works but an xmlhttp get request does not. It also doesn't seem possible to host on port 443 or 80. Is it wrong to assume we can't use repl.it as a server for get requests?
Yeah @splch, I have the same problem as you.
I'm not going to type the source code from the image. If you want me to look into it, then please share a minimal project with a clear description (reproduction steps).