← PHP / Laravel 목차

PHP-058 / 중급

레이트 리밋 없는 API로 자원 소모 (DoS)

A04:2021 Insecure Design · CWE-770 Allocation of Resources Without Limits

왜 문제가 될까요?

무제한 요청으로 DB/메일/외부 API 비용과 가용성이 소진된다.

이렇게 수정하세요

php
Route::post('/sms/send', SmsCtrl::class)->middleware('throttle:10,1');

더 읽기