A cors-anywhere–style proxy. Prefix any request URL with this service and the response comes back with permissive CORS headers, so your frontend can call endpoints that would otherwise be blocked by the browser.
Put the full target URL right after the proxy path:
https://<host>/cors-proxy/<full-target-url>
The proxy forwards your method, headers, and body to the target, then returns the target's
response with Access-Control-Allow-* headers added. Preflight
(OPTIONS) requests are answered directly by the proxy.
Simple GET from the browser:
// Instead of calling the blocked endpoint directly:
// fetch('https://api.example.com/data') // ❌ CORS error
fetch('/cors-proxy/https://api.example.com/data')
.then(r => r.json())
.then(console.log);
POST with a JSON body — headers and body are forwarded as-is:
fetch('/cors-proxy/https://api.example.com/items', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ...' },
body: JSON.stringify({ name: 'demo' })
})
.then(r => r.json())
.then(console.log);
Query strings are preserved — just include them in the target URL:
fetch('/cors-proxy/https://api.example.com/search?q=hello&page=2')
| Item | Value |
|---|---|
| Methods | GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD |
| Target URL | Must start with http:// or https:// |
| Timeout | 30 seconds (returns 504 if the target is too slow) |
| Errors | 400 invalid URL · 502 target unreachable · 504 timeout |