라라벨 Rate Limiting

Jmnote (토론 | 기여)님의 2023년 8월 20일 (일) 15:45 판 (새 문서: ==개요== ;라라벨 Rate Limiting {{소스헤더|RouteServiceProvider.php}} <syntaxhighlight lang='php'> .. public function boot(): void { RateLimiter::for('api', f...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

라라벨 Rate Limiting
RouteServiceProvider.php
..
    public function boot(): void
    {
        RateLimiter::for('api', function (Request $request) {
            // return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
            return Limit::perMinute(120)->by($request->user()?->id ?: $request->ip());
        });
...
분당 제한 완화: 60회 → 120회

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}