fix CORSE add Access-Control-Allow-Origin to Headers
This commit is contained in:
parent
1394e89d45
commit
55f412c8eb
@ -21,6 +21,7 @@ class ApiController extends Controller
|
|||||||
'Origin' => ['*'],
|
'Origin' => ['*'],
|
||||||
//'Access-Control-Allow-Credentials' => true,
|
//'Access-Control-Allow-Credentials' => true,
|
||||||
'Access-Control-Allow-Headers' => [
|
'Access-Control-Allow-Headers' => [
|
||||||
|
'Access-Control-Allow-Origin',
|
||||||
'Content-Type',
|
'Content-Type',
|
||||||
'Access-Control-Allow-Headers',
|
'Access-Control-Allow-Headers',
|
||||||
'Authorization',
|
'Authorization',
|
||||||
|
@ -18,7 +18,7 @@ class ProfileController extends ApiController
|
|||||||
'verbs' => [
|
'verbs' => [
|
||||||
'class' => \yii\filters\VerbFilter::class,
|
'class' => \yii\filters\VerbFilter::class,
|
||||||
'actions' => [
|
'actions' => [
|
||||||
'' => ['get'],
|
'' => ['GET', 'HEAD', 'OPTIONS'],
|
||||||
'profile-with-report-permission' => ['post', 'patch'],
|
'profile-with-report-permission' => ['post', 'patch'],
|
||||||
'get-main-data' => ['get']
|
'get-main-data' => ['get']
|
||||||
],
|
],
|
||||||
|
@ -32,6 +32,7 @@ class UserController extends ActiveController
|
|||||||
'Origin' => ['*'],
|
'Origin' => ['*'],
|
||||||
//'Access-Control-Allow-Credentials' => true,
|
//'Access-Control-Allow-Credentials' => true,
|
||||||
'Access-Control-Allow-Headers' => [
|
'Access-Control-Allow-Headers' => [
|
||||||
|
'Access-Control-Allow-Origin',
|
||||||
'Content-Type',
|
'Content-Type',
|
||||||
'Access-Control-Allow-Headers',
|
'Access-Control-Allow-Headers',
|
||||||
'Authorization',
|
'Authorization',
|
||||||
|
Loading…
Reference in New Issue
Block a user