Commit b59e991
committed
Add rate limiter and input validation to /norad/:id route
The NORAD route was missing the rate limiter middleware that all other
routes (tle, json, csv) use. This allowed unlimited requests that could
abuse Celestrak upstream.
Also adds validation for NORAD catalog IDs — rejects NaN, negative,
and out-of-range values (must be 1-999999) with a 400 response instead
of forwarding garbage to Celestrak.1 parent eb70a2c commit b59e991
1 file changed
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
0 commit comments