We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45c88e7 commit 0bfaabaCopy full SHA for 0bfaaba
1 file changed
src/Hander/Whoops.php
@@ -21,7 +21,8 @@ public function render($request, Throwable $e): Response
21
}
22
23
// 兼容 Cors Postman 请求
24
- if ($request->isAjax() || false !== strpos($_SERVER['HTTP_USER_AGENT'], 'Postman') || (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
+ // $request->isAjax() 判断不太正常
25
+ if ($request->isJson() || false !== strpos($_SERVER['HTTP_USER_AGENT'], 'Postman') || (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
26
return $this->handleAjaxException($e);
27
} else {
28
$this->app->whoops->pushHandler(new PrettyPageHandler());
0 commit comments