We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36a6ceb commit cd09a9bCopy full SHA for cd09a9b
1 file changed
src/Hander/Whoops.php
@@ -28,8 +28,8 @@ public function render($request, Throwable $e): Response
28
if (config('whoops.enable') && $this->app->isDebug()) {
29
$this->runner->pushHandler(new PrettyPageHandler());
30
31
- // 兼容 Cors请求
32
- if ($request->isAjax() || $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors') {
+ // 兼容 Cors请求(一些调试接口插件)
+ if ($request->isAjax() || (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
33
$this->runner->pushHandler(new JsonResponseHandler());
34
}
35
0 commit comments