The hosting for jsonp.afeld.me became too expensive to pay out of pocket, so I have decided to shut this down. Glad so many people found it useful over the years!
JSONProxy
HTTP proxy that enables cross-domain requests to any JSON API. See https://jsonp.afeld.me for documentation. See the releases page for the client library changelog.
Development
Code is written in a combination of JavaScript and TypeScript. The app is written to be deployed to a CloudFlare Worker using Terraform, but can be run locally by doing the following:
-
Install NodeJS >= 7.6.0.
-
Install the dependencies.
npm install
-
Run the server.
npm start
See CONTRIBUTING for more info.
Deployment
-
Install NodeJS >= 7.6.0 and Terraform.
-
Install the dependencies.
npm install
-
Set up CloudFlare.
- Sign up for CloudFlare, and ensure you have a domain pointed there for DNS.
- Get a CloudFlare API key.
- Visit the API Tokens page.
- Click
Create Token
. Use template
forEdit Cloudflare Workers
.- Add permissions for
DNS
andZone
.
- Go into the
terraform/
directory.
cd terraform
- Create a
terraform/terraform.tfvars
file.
cloudflare_account_id = "..." cloudflare_token = "..."
-
Set up Terraform.
terraform init
-
Deploy the environment.
cd .. npm run deploy
If you use the client library with your own JSONP deployment, override the proxy URL before calling $.jsonp()
.
$.jsonp.PROXY = 'https://mydomain.com/proxy/path/';