Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function init() |
||
22 | { |
||
23 | parent::init(); |
||
24 | if (YII_DEBUG) { |
||
25 | $tag = Yii::$app->log->targets['debug']->tag; |
||
26 | $url = getenv('APP_HOST') . 'api/debug/default/view?tag=' . $tag . '&panel=api'; |
||
27 | Yii::$app->response->headers->add('x-debug-tag', $tag); |
||
28 | Yii::$app->response->headers->add('x-debug-url', $url); |
||
29 | } |
||
30 | Yii::$app->response->format = Response::FORMAT_JSON; |
||
31 | Yii::$app->response->headers->add('x-author', 'lianluo.com'); |
||
44 |