Rob--W / cors-anywhere

CORS Anywhere is a NodeJS reverse proxy which adds CORS headers to the proxied request.
MIT License
8.57k stars 5.99k forks source link

403 Forbidden on demo dev server, IP range being blocked? #422

Closed AJamesPhillips closed 2 years ago

AJamesPhillips commented 2 years ago

I tried the following URL: https://europepmc.org/articles/pmc5488957?pdf=render on https://robwu.nl/cors-anywhere.html but it shows a 403 Forbidden error. When I tried to get the PDF using import requests; url='https://europepmc.org/articles/pmc5488957?pdf=render'; r = requests.get(url, stream=True) on Python3 it returned the PDF with a 200.

I will try running the CORS-server in node to see what might be the problem but any ideas?

Specific error message on https://robwu.nl/cors-anywhere.html

GET https://europepmc.org/articles/pmc5488957?pdf=render
403 Forbidden

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /backend/ptpmcrender.fcgi
on this server.</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

Thank you for this tool.

AJamesPhillips commented 2 years ago

Hmm, no it seems to be fine when run locally? Perhaps the IP address range(s) of the demo server is blocked by the europepmc.org server.

Rob--W commented 2 years ago

Hmm, no it seems to be fine when run locally? Perhaps the IP address range(s) of the demo server is blocked by the europepmc.org server.

Looks like an issue caused by the destination server and not the library itself.