up. 双向数据加密
This commit is contained in:
parent
701610d683
commit
33e176d440
@ -23,7 +23,12 @@ class ContextMiddleware extends middleware
|
|||||||
if ($request->header('x-encrypted') == 'true') {
|
if ($request->header('x-encrypted') == 'true') {
|
||||||
$encryptedData = $request->param('encryptedData','');
|
$encryptedData = $request->param('encryptedData','');
|
||||||
if($encryptedData) {
|
if($encryptedData) {
|
||||||
$jsonInput = $this->decryptCryptoJSData($encryptedData);
|
try{
|
||||||
|
$jsonInput = $this->decryptCryptoJSData($encryptedData);
|
||||||
|
}catch (\Throwable $e){
|
||||||
|
$jsonInput = null;
|
||||||
|
}
|
||||||
|
|
||||||
if($jsonInput) {
|
if($jsonInput) {
|
||||||
return json(['code'=>500,'message'=>'E0.数据解密失败']);
|
return json(['code'=>500,'message'=>'E0.数据解密失败']);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user