Skip to content
 
 

Latest commit

 

History

94 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jpl-cors-proxy

Source:

jpl-cors-proxy

Deployment

This project is written in Cloudfalre Workers, and can be easily deployed with Wrangler CLI.

wrangler deploy

Usage Example

const YOUR_CLOUDFLAIRE_PROXY_SERVER = "https://your-cloudflare.workers.dev";
const YOUR_TARGET = "https://what-ever-api.org/?a=1&b=2";
const response = await fetch("${YOUR_CLOUDFLAIRE_PROXY_SERVER}?${YOUR_TARGET}", {
  mode: 'cors'
});
const body = await response.arrayBuffer();

Note:

All received headers are also returned in "cors-received-headers" header.

The proxy accepts only fetch and XmlHttpRequest.

To create your own is very easy, you just need to set up a cloudflare account and upload the worker code.

About

sunray cors

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages