Commit 9aa0f69a 9aa0f69a39fe50a42121b540a00c11ec61bd6f8d by lemon

*

1 parent 16345b5d
......@@ -38,7 +38,7 @@ class AuthIdentifier
$request->attributes->add(['request_id' => Snowflake::gen(),]);
$prefix = current(explode('/', $request->path()));
if (!in_array($prefix, $this->auth)) goto AUTH;
if (!in_array($prefix, $this->auth) || (in_array($request->ip(), explode(',', config('api.inside')['ip'])))) goto AUTH;
$identifier = $request->header('identifier');
......
<?php
return [
'inside' => [
'ip' => env('WHITE_LIST', '121.5.221.142'),
],
];