Commit 9aa0f69a 9aa0f69a39fe50a42121b540a00c11ec61bd6f8d by lemon

*

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