Skip to content

Commit

Permalink
开启跨域支持
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyan74 committed Mar 16, 2020
1 parent cb6f530 commit 9f716ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions api/controllers/ActiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ public function behaviors()
{
$behaviors = parent::behaviors();
// 跨域支持
// $behaviors['corsFilter'] = [
// 'class' => Cors::class,
// ];
$behaviors['corsFilter'] = [
'class' => Cors::class,
];

// var_dump(1);die();
// 移除行为的权限验证的优先级
unset($behaviors['authenticator']);

Expand Down
7 changes: 3 additions & 4 deletions merapi/controllers/ActiveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ public function behaviors()
{
$behaviors = parent::behaviors();
// 跨域支持
// $behaviors['corsFilter'] = [
// 'class' => Cors::class,
// ];
$behaviors['corsFilter'] = [
'class' => Cors::class,
];

// var_dump(1);die();
// 移除行为的权限验证的优先级
unset($behaviors['authenticator']);

Expand Down

0 comments on commit 9f716ed

Please sign in to comment.