Skip to content

Getting Started

To use Corsfix, add https://proxy.corsfix.com/? before your URL when making fetch requests.

// Add Corsfix URL before the API
// https://proxy.corsfix.com/? + https://api.example.com/data
fetch("https://proxy.corsfix.com/?https://api.example.com/data");
// GET request
fetch("https://proxy.corsfix.com/?https://api.example.com/users")
.then((response) => response.json())
.then((data) => console.log(data));
// POST request
fetch("https://proxy.corsfix.com/?https://api.example.com/users", {
method: "POST",
body: JSON.stringify({ name: "John" }),
headers: {
"Content-Type": "application/json",
},
});

You should use the domain whitelist via the dashboard. If that’s not possible for your use case, you can fall back to using an API key.

fetch("https://proxy.corsfix.com/?https://api.example.com/data", {
headers: {
"x-corsfix-key": "cfx_12345678",
},
});

We discourage using API key on the client side, as it can be exposed in your source code and browser network requests.