Files
osint/app/Providers/AppServiceProvider.php
T

34 lines
1.0 KiB
PHP
Raw Normal View History

2026-07-20 10:22:05 +03:00
<?php
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Support\Facades\RateLimiter;
2026-07-20 10:22:05 +03:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Self-imposed limits so bulk-running lookups doesn't hammer the
// free public infrastructure these runners depend on. ip-api.com's
// limit (45/min) is theirs; the rest are courtesy limits of ours.
RateLimiter::for('osint-runner:ip-api', fn () => Limit::perMinute(45));
RateLimiter::for('osint-runner:crtsh', fn () => Limit::perMinute(30));
RateLimiter::for('osint-runner:whois', fn () => Limit::perMinute(20));
RateLimiter::for('osint-runner:sherlock', fn () => Limit::perMinute(10));
RateLimiter::for('osint-runner:theharvester', fn () => Limit::perMinute(5));
2026-07-20 10:22:05 +03:00
}
}