Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/github30/express-cors-anywhere

CORS Proxy via Deta
https://github.com/github30/express-cors-anywhere

cors cors-anywhere cors-proxy deta deta-cors deta-micros

Last synced: 4 days ago
JSON representation

CORS Proxy via Deta

Awesome Lists containing this project

README

        

### Usage

curl https://corsproxy.deta.dev/https://example.com/

```javascript
html = await fetch('https://corsproxy.deta.dev/https://example.com/').then(r=>r.text())
console.log(html)
```

POST request

```bash
curl -X POST -H "Content-Type: application/json" -d '{"Name":"John Doe", "Age":"5"}' https://corsproxy.deta.dev/https://httpbin.org/post
```

```javascript
res = await fetch('https://corsproxy.deta.dev/https://httpbin.org/post', {method: 'POST', body: '{"Name":"John Doe", "Age":"5"}'}).then(r=>r.json())
console.log(res)
```

Status code

https://corsproxy.deta.dev/https://httpbin.org/status/404

### Debug

```bash
git clone https://github.com/GitHub30/express-cors-anywhere
cd express-cors-anywhere
npm install

node app.js
```

### Deploy

```bash
deta deploy
```