We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a3dc71 commit 8d0382eCopy full SHA for 8d0382e
1 file changed
src/Hander/Whoops.php
@@ -33,8 +33,10 @@ public function render($request, Throwable $e): Response
33
34
$this->runner->pushHandler(new PrettyPageHandler());
35
36
- // 兼容 Cors请求
37
- if ($request->isAjax() || (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
+ // 兼容 Cors Postman 请求
+ if ($request->isAjax() ||
38
+ false !== strpos($_SERVER['HTTP_USER_AGENT'], 'Postman') ||
39
+ (isset($_SERVER['HTTP_SEC_FETCH_MODE']) && $_SERVER['HTTP_SEC_FETCH_MODE'] === 'cors')) {
40
$this->runner->pushHandler(new JsonResponseHandler());
41
}
42
0 commit comments