up. 双向数据加密

This commit is contained in:
u2nyakim 2025-08-29 16:19:07 +08:00
parent dc53249596
commit 73bd4b9a2b

View File

@ -23,11 +23,11 @@ class ContextMiddleware extends middleware
if ($request->header('x-encrypted') == 'true') {
$encryptedData = $request->param('encryptedData','');
if($encryptedData) {
try{
// try{
$jsonInput = \app\Request::decryptCryptoJSData($encryptedData);
}catch (\Throwable){
$jsonInput = null;
}
// }catch (\Throwable){
// $jsonInput = null;
// }
if($jsonInput) {
return json(['code'=>500,'message'=>'E0.数据解密失败']);