Skip to content

Commit cd09a9b

Browse files
committed
fix #3
1 parent 36a6ceb commit cd09a9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Hander/Whoops.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function render($request, Throwable $e): Response
2828
if (config('whoops.enable') && $this->app->isDebug()) {
2929
$this->runner->pushHandler(new PrettyPageHandler());
3030

31-
// 兼容 Cors请求
32-
if ($request->isAjax() || $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors') {
31+
// 兼容 Cors请求(一些调试接口插件)
32+
if ($request->isAjax() || (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
3333
$this->runner->pushHandler(new JsonResponseHandler());
3434
}
3535

0 commit comments

Comments
 (0)