Skip to content

GitHub30/express-cors-anywhere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

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

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

POST request

curl -X POST -H "Content-Type: application/json" -d '{"Name":"John Doe", "Age":"5"}' https://corsproxy.deta.dev/https://httpbin.org/post
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

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

node app.js

Deploy

deta deploy