Версия Laravel 10.
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
Настройки axios:
const axiosInstance = Axios.create({
withCredentials: false,
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'multipart/form-data; boundary=something',
'Accept': 'application/json',
'Application': 'application/json',
// 'Authorization': 'Bearer ' + localStorage.getItem('token'),
},
Локально всё работает, залил на vps и получаю ошибку - has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
По какой причине может выпадать эта ошибка?