How to create a hardened API for middleware | Hacker News Reader