Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oshekharo/cors-bypasser
A simple Node.js server that acts as a CORS proxy, forwarding requests to a target URL.
https://github.com/oshekharo/cors-bypasser
cors cors-anywhere cors-proxy nodejs serverless
Last synced: about 2 months ago
JSON representation
A simple Node.js server that acts as a CORS proxy, forwarding requests to a target URL.
- Host: GitHub
- URL: https://github.com/oshekharo/cors-bypasser
- Owner: OshekharO
- Created: 2023-07-13T12:16:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-22T10:01:13.000Z (6 months ago)
- Last Synced: 2024-07-06T00:06:03.936Z (6 months ago)
- Topics: cors, cors-anywhere, cors-proxy, nodejs, serverless
- Language: HTML
- Homepage: https://cors-bypasser-gilt.vercel.app
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🔀 CORS Proxy
## 🚀 Features
- 🔎 GET and POST requests
- 🛠Bypasses CORS restrictions
- 📨 Includes headers in the request
- 🚦 Handles CORS preflight requests
- 🖥 Built with Express.js## 📚 Usage
### GET Requests 📩
Simply append the target URL as a query parameter:
`https://cors-bypasser-gilt.vercel.app/fetchdata?url=YOUR_URL_HERE`
### POST Requests 📤
Send a JSON object in the body of the request with url and headers properties:
```javascript
function check(code) {
const targetUrl = `https://securepayment.zee5.com/paymentGateway/coupon/verification?coupon_code=${code}&country_code=IN&translation=en`;
const proxyUrl = 'https://cors-bypasser-gilt.vercel.app/fetchdata';
const headers = {
'Referer': 'https://b2bapi.zee5.com/',
'Origin': 'https://b2bapi.zee5.com'
}
const body = {
'coupon_code': code,
'country_code': 'IN',
'translation': 'en'
}return fetch(proxyUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ url: targetUrl, headers: headers, body: body })
})
.then(response => {
return {status: response.status, data: response.json()};
});
}