💀 A bare-minimum solution to solve CORS problem via proxy API
MIT License
A bare-minimum solution to solve CORS problem via proxy API
Base URL: https://cors-hijacker.vercel.app
Endpoint: ${BASE_URL}/api?url=${YOUR_ENCODED_URL}
Sample Request:
// Get html from https://mazipan.space/
const res = await fetch(
`https://cors-hijacker.vercel.app/api?url=${encodeURIComponent(
'https://mazipan.space/'
)}`,
{
headers: {
// Content-Type is required
'Content-Type': 'text/html',
},
}
);
const html = await res.text();
Sample Request:
const res = await fetch(
`https://cors-hijacker.vercel.app/api?url=${encodeURIComponent(
'https://ksana.in/api/ping'
)}`,
{
headers: {
// Content-Type is required
'Content-Type': 'application/json',
},
}
);
const jsonResponse = await res.json();
Sample Request:
const res = await fetch(
`https://cors-hijacker.vercel.app/api?url=${encodeURIComponent(
'https://ksana.in/api/ping'
)}`,
{
// method is required
method: 'POST',
headers: {
// Content-Type is required
'Content-Type': 'application/json',
},
// body is optional
body: JSON.stringify(additionalBodyParam),
}
);
const jsonResponse = await res.json();
Form
submission.host
header (see on index.ts#L48)Copyright By Irfan Maulana