mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-25 16:37:32 +00:00
* fix(producer): startServer never listens without a token Any local account, container or sandboxed program can reach a loopback port, and with no token set every route but /health accepted a header-less caller. When neither authToken nor PRODUCER_AUTH_TOKEN is set, startServer now makes a random token for the run, writes it to a file only the server's account can read (~/.hyperframes/producer/<port>.token by default, or authTokenFile, or PRODUCER_AUTH_TOKEN_FILE), logs that path, and requires it like a configured token. The file is removed on shutdown. createProducerApp and createRenderHandlers keep their behavior, and their docs now say they check no caller without a token. * refactor(producer): keep server.ts at its comment share * test(producer): call the started server through node:http on localhost The unit lane refuses fetch and every lookup but localhost, so the startServer tests listen on localhost and send their requests with node:http to the address it bound. * refactor(producer): keep server.ts at its comment share