You've already forked Atomcms-edit
Add radio embed widget, SSE real-time, song history, moderation panel, and Auto DJ
- Embed widget: standalone iframe player with dark/light/transparent themes, copy-paste embed code admin page - Real-time SSE: streaming now-playing/listeners/dj events, replaces polling in radio-player and embed - Song history: auto-records song changes to radio_song_plays table, Filament resource to view - DJ moderation: unified panel for shouts approval, song request queue, DJ applications - Auto DJ: playlist management with round-robin playback when no DJ is live - Refactored radio-player Alpine component to use EventSource API with auto-reconnect
This commit is contained in:
@@ -69,6 +69,12 @@ class RouteServiceProvider extends ServiceProvider
|
||||
RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(15)->by($request->ip()));
|
||||
|
||||
// Rate limit for radio endpoints (high traffic)
|
||||
RateLimiter::for('radio', fn (Request $request) => Limit::perMinute(120)->by($request->user()?->id ?: $request->ip()));
|
||||
RateLimiter::for('radio', function (Request $request) {
|
||||
$key = $request->get('radio_api_key_id')
|
||||
?? $request->user()?->id
|
||||
?? $request->ip();
|
||||
|
||||
return Limit::perMinute(120)->by((string) $key);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user