Answer the question
In order to leave comments, you need to log in
Why doesn't it allow Access-Control-Allow-Origin?
Hey!
I send an AJAX GET request to my external
CORS service configured with the barryvdh/laravel-cors library
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedOriginsPatterns' => [],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,
Access to XMLHttpRequest at 'https://путь_на_внешний_сервис' from origin 'http://сайт' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://сайт, *', but only one is allowed.
Answer the question
In order to leave comments, you need to log in
The allowedOrigins value helped to translate from an array to a string'allowedOrigins' => '*'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question