var fetchOptions = {
mode: 'no-cors'
};
fetch('http://localhost:3000/campaigns/contacted/, fetchOptions)
.then(response => response.json())
.then(data => { console.log(data) })
.catch(error => console.error(error));
<?php
header('Access-Control-Allow-Origin: *');
// Ваш код
?>