Explorar el Código

同时分辨 application/x-www-form-urlencoded 和 multipart/form-data 输入格式

shizhongqi hace 8 meses
padre
commit
4426e9a997
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      common/config/main.php

+ 3 - 3
common/config/main.php

@@ -5,9 +5,9 @@ return [
 		'request' => [
 			'cookieValidationKey' => '3i18DOM7ZDqqQfr2S0hj0c60wFxxTb3J',
 			'enableCsrfValidation' => false,
-			// 'parsers' => [
-			// 	'application/json' => 'yii\web\JsonParser',
-			// ] // 启用 JSON 输入
+			 'parsers' => [
+			 	'application/json' => 'yii\web\JsonParser',
+			 ] // 启用 JSON 输入
 			// 信息: 上述配置是可选的。若未按上述配置,API 将仅可以分辨 application/x-www-form-urlencoded 和 multipart/form-data 输入格式
 		],
 		'cache' => [