afeld / jsonp

DEPRECATED - A proxy to help with cross-domain requests
https://jsonp.afeld.me
MIT License
303 stars 37 forks source link

Getting an error page when looking up particular domains #107

Open bvanrijn opened 7 years ago

bvanrijn commented 7 years ago

Go to https://jsonp.afeld.me/?url=icanhazip.com.

The server (probably) crashes and a CloudFlare 502 error page is shown. JSONProxy starts working after a few minutes.

Maybe this is happening because icanhazip.com contains no valid JSON? I will try with some other sites and post an update here.

bvanrijn commented 7 years ago

Non-resolvable URLs knock it down as well.

bvanrijn commented 7 years ago

I even tried google.com and example.com, they worked and showed me their respective HTML pages.

bvanrijn commented 7 years ago

Related: #63

bvanrijn commented 7 years ago

None of the aforementioned domains failed locally (i.e. responded with an error page, instead of JSON) on Git master branch, but they did return status code 502. It seems CloudFlare implicitly assumes the site's broken once it sends a 502.

Then this is an issue with CloudFlare and not JSONProxy...

bvanrijn commented 7 years ago

For CloudFlare, however, it seem like it's a feature, not a bug.

Would it make sense to always send a 200 OK response, and have the client figure out if something went wrong? (i.e. the error key is present)