Commit f49e83f5 f49e83f525a7e7914c7054bd5a32aadd71492d6e by lemon

处理数据

1 parent cfa06383
......@@ -22,8 +22,9 @@ class AuthIdentifier
/**
* @var string[]
*/
protected $auth = ['api'];
protected $auth = ['api', ''];
protected $route = ['/song/latestOnlineRecord'];
/**
* Handle an incoming request.
......@@ -40,6 +41,12 @@ class AuthIdentifier
$prefix = current(explode('/', $request->path()));
if (!in_array($prefix, $this->auth)) goto AUTH;
foreach ($this->route as $route) {
if (strpos($request->path(), $route) !== false) {
goto AUTH;
}
}
$identifier = $request->header('identifier');
if (env('APP_ENV') == 'local' && empty($identifier)) {
......
......@@ -53,7 +53,7 @@ Route::group([], function (){
//发行
Route::group(["prefix"=>"issue"], function (){
Route::post('/album/subCompany', 'IssueController@subCompany');
Route::post('{uri}', 'IssueController@index')->where(['uri'=>'.*+']);
Route::any('{uri}', 'IssueController@index')->where(['uri'=>'.*+']);
});
//api-v2
......