• Stefy Lanza (nextime / spora )'s avatar
    ocr: the attach path must not be one keystroke from a public one · 23b49d60
    Stefy Lanza (nextime / spora ) authored
    The fan-out gateway lived at /v1/ocr/engine/<lease>/… and the new catalogue at
    /v1/ocr/engines. They do not collide, but both auth gates exempt the gateway by
    PREFIX — so any later route under /v1/ocr/engine* would have inherited that
    exemption silently, and the two names are indistinguishable at a glance in a
    middleware condition.
    
    The gateway is now /v1/ocr/attach/<lease>/…: internal by name, and nothing a
    public path family will grow into. Tests assert /v1/ocr/engines still requires
    ordinary authentication at both gates, and that a plausible future sibling
    (/v1/ocr/engine-stats) does too.
    
    Free to rename because nothing consumes the lease URL yet — it is minted per
    attachment at run time and never written down.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01PxYHWbCAjjjD7A1rhFKtaW
    23b49d60
app.py 41.9 KB