Week 4 - Day 4
← Back to Week 4 / ← Course Index
Goal
Guard one route and add logs
Steps
- Add a header-based guard that checks x-api-key for one protected route.
- Add a request logger that prints method, path, and elapsed ms.
- Extra practice if you want
- return a clear 401 JSON object on failure