mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
remove blacklist module
This commit is contained in:
parent
5d222ca681
commit
88099af4d3
40
COMMANDS.MD
40
COMMANDS.MD
@ -20,46 +20,6 @@ Example: `php artisan serve`
|
||||
|
||||
Serve the application on the PHP development server
|
||||
|
||||
### Blacklist
|
||||
Add IPs to your API's blacklist. A blacklisted IP will get a HTTP 403 with the following JSON body:
|
||||
```json
|
||||
{
|
||||
"status": 403,
|
||||
"type": null,
|
||||
"message": "You have been blocked from the service for breaching Terms of Use",
|
||||
"error": null
|
||||
}
|
||||
```
|
||||
|
||||
The blacklist is stored in `/storage/app/blacklist.json`. Once your application starts, the blacklist is loaded into memory via Redis.
|
||||
|
||||
#### Blacklist: Add
|
||||
Command: `blacklist:add {ip} {--reload}`
|
||||
|
||||
Example: `php artisan blacklist:add 123.456.789.10`
|
||||
|
||||
**Note:** Without `--reload`, the blacklist won't take immediate effect as it will only be saved to `blacklist.json` and won't updated in-memory.
|
||||
|
||||
Therefore, it's recommended to use `--reload` for real-time effect.
|
||||
|
||||
#### Blacklist: Remove
|
||||
Command: `blacklist:remove {ip} {--reload}`
|
||||
|
||||
Example: `php artisan blacklist:remove 123.456.789.10`
|
||||
|
||||
**Note:** Without `--reload`, the blacklist won't take immediate effect as it will only be removed from `blacklist.json` and won't be updated in-memory.
|
||||
|
||||
Therefore, it's recommended to use `--reload` for real-time effect.
|
||||
|
||||
#### Blacklist: Flush
|
||||
Command: `blacklist:flush {--reload}`
|
||||
|
||||
Example: `php artisan blacklist:flush`
|
||||
|
||||
**Note:** Without `--reload`, the blacklist won't take immediate effect as it will only empty `blacklist.json` and won't be updated in-memory.
|
||||
|
||||
Therefore, it's recommended to use `--reload` for real-time effect.
|
||||
|
||||
### Queue
|
||||
|
||||
#### Queue: Clear
|
||||
|
@ -12,10 +12,8 @@ require_once __DIR__.'/../vendor/autoload.php';
|
||||
/*
|
||||
Defines
|
||||
*/
|
||||
defined('BLACKLIST_PATH') or define('BLACKLIST_PATH', __DIR__.'/../storage/app/blacklist.json');
|
||||
defined('JIKAN_PARSER_VERSION') or define('JIKAN_PARSER_VERSION', Versions::getVersion('jikan-me/jikan'));
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Create The Application
|
||||
@ -73,7 +71,6 @@ $app->singleton(
|
||||
*/
|
||||
|
||||
$app->routeMiddleware([
|
||||
// 'blacklist' => App\Http\Middleware\Blacklist::class,
|
||||
// 'slave-auth' => App\Http\Middleware\SlaveAuthentication::class,
|
||||
// 'meta' => App\Http\Middleware\Meta::class,
|
||||
// 'cache-resolver' => App\Http\Middleware\CacheResolver::class,
|
||||
@ -141,7 +138,6 @@ $app->register(\App\Providers\SourceHeartbeatProvider::class);
|
||||
*/
|
||||
|
||||
$commonMiddleware = [
|
||||
// 'blacklist',
|
||||
// 'slave-auth',
|
||||
// 'meta',
|
||||
// 'etag',
|
||||
|
Loading…
x
Reference in New Issue
Block a user