Код: Выделить всё
return [
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['https://example.co.uk', '*.example.co.uk', 'example.co.uk'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => true,
];
Я использую nuxt 3 в своем интерфейсе, но при проверке все равно я вижу ответ
Код: Выделить всё
Access-Control-Allow-Origin: *
Код: Выделить всё
Access to fetch at 'https://api.example.co.uk/api/user' from origin 'https://example.co.uk' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
Я пробовал буквально все, что видел в Интернете, но ничего не работает
Подробнее здесь: https://stackoverflow.com/questions/786 ... a-wildcard