Commit 4db70c8d authored by yinxiaoling's avatar yinxiaoling

api_key在头部传输api-key

parent d149b5c3
......@@ -22,8 +22,9 @@ class CheckApiKey
{
try {
$url=$request->url;
$api_key=$request->api_key;
//$api_key=$request->api_key;
$user_sn=$request->user_sn;
$api_key = $request->header('api-key');//header头里面不能用下划线的参数
if (empty($api_key) || empty($user_sn)){
return $this->errorWithInfo('参数验证不通过', 401);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment