CORS preflight
/v1/collect
const url = 'https://collect.localhost/v1/collect';const options = {method: 'OPTIONS'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request OPTIONS \ --url https://collect.localhost/v1/collectThe browser’s preflight for the collect call. It is open; the POST checks the origin.
Responses
Section titled “Responses”Allowed.