Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Commit

Permalink
fix not use deprecated header (use correct with header)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozee31 committed Apr 13, 2017
1 parent a245a66 commit 73ee14f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,6 @@ If you do not want this, you can change this option but it is recommended to add
```PHP
public function beforeRender(Event $event) {
// ...
$this->response->withHeader('Access-Control-Allow-Origin', '*');
$this->response = $this->response->withHeader('Access-Control-Allow-Origin', '*');
}
```
2 changes: 1 addition & 1 deletion src/Controller/ErrorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public function initialize()
public function beforeRender(Event $event)
{
parent::beforeRender($event);
$this->response->header(['Access-Control-Allow-Origin' => '*']);
$this->response = $this->response->withHeader('Access-Control-Allow-Origin', '*');
}
}

0 comments on commit 73ee14f

Please sign in to comment.