refactor: 优化后台兼容接口请求的判断

This commit is contained in:
augushong
2025-03-10 18:17:28 +08:00
parent 7f92b0e07a
commit e33863af46
3 changed files with 20 additions and 21 deletions

View File

@@ -222,7 +222,7 @@ class AdminControllerBase extends BaseController
public function checkParseApi()
{
if (Config::get('app.auto_parse_api')) {
if ($this->request->isJsonPure() && $this->request->param('get_page_data')) {
if ($this->request->isJson() && $this->request->param('get_page_data')) {
return true;
}
}