PHP code example of liquidbcn / craftcms-rate-limit

1. Go to this page and download the library: Download liquidbcn/craftcms-rate-limit library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

liquidbcn / craftcms-rate-limit example snippets




return [
    'enabled' => true,
    'maxRequestsPerIpPerMinute' => 200,
    'excludedIps' => [
        '127.0.0.1',
        '10.0.0.0/8',
        '192.168.1.0/24',
    ],
];



return [
    '*' => [
        'maxRequestsPerIpPerMinute' => 200,
    ],
    'dev' => [
        'enabled' => false,
    ],
    'production' => [
        'maxRequestsPerIpPerMinute' => 100,
    ],
];