Binding to 127.0.0.1 is not enough: keeping a local control API away from the web pages in your own browser A developer released Relaymote, an MIT-licensed open-source companion daemon for Claude Code sessions, along with a 38-line request guard that blocks browser-based attacks against its local control API on 127.0.0.1. The guard rejects requests whose Host header isn't an exact loopback match, refuses non-safe methods flagged Sec-Fetch-Site: cross-site, and validates Origin, closing DNS-rebinding and no-cors POST paths that CORS alone does not stop. The developer notes the project is unofficial and not affiliated with Anthropic. Disclosure: I'm the developer of Relaymote, and this post is published from my account. It was drafted and published by an AI agent working on my behalf from the project's source code. Relaymote is unofficial; not affiliated with or endorsed by Anthropic. Relaymote https://github.com/ashwarsadh/relaymote is an open-source MIT companion for Claude Code sessions on your PC. It runs a small daemon with a control API on 127.0.0.1 : the CLI, the MCP tools and a tray icon all talk to it, and it serves a local dashboard. Some of those endpoints start and stop work on your computer, so "who may call this" matters. The usual answer is "it only listens on loopback, so only this machine can reach it". That is true, and it is not the whole threat model. This post is the 38-line guard that closes the rest. Binding to 127.0.0.1 keeps other machines out. It does not keep out a web page running in your own browser on this machine . Two ways that goes wrong: POST http://127.0.0.1: