afeld / jsonp

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

create a specific endpoint for the API passthrough #82

Open afeld opened 8 years ago

afeld commented 8 years ago

i.e. /api/v1/proxy?url.... Too confusing to have the API and homepage shared at the same path, and makes things like #81 difficult (since it can't always assume a url param to use as a key for throttling).

thewisenerd commented 8 years ago

Would this issue also enclose the following case; where you have your own site running at port 80?

eg:

http://example.com redirects to my own page;

and

http://example.com/api/v1/proxy redirects to jsonp service running at port, say 8000

Is url redirection the only way to do this?

afeld commented 8 years ago

In that case, you might have to something in your web server (e.g. nginx) configuration. You could also consider setting up your instance of JSONProxy at a subdomain rather than a sub-path.