Fine-grained HTTP filtering for Claude Code
ammar.io
ammar.io
It works for any process, not just Claude Code. I got it working with Codex CLI like this:
httpjail --js "r.host === 'chatgpt.com'" -- codex
After installing it using Cargo (and Homebrew): brew upgrade rust
cargo install httpjail
I wrote more notes about it here: https://simonwillison.net/2025/Sep/19/httpjail/If only developers never made use of GET to modify resources...
https://www.reddit.com/r/webdev/comments/6999x7/comment/dh4v...
Of course, some websites may permit mutations through GET so it’s probably only sensible to use alongside known hosts.
GET requests are also easier to be abused in Cross Site Request Forgery (CSRF) attacks. Modern countermeasures in browsers (like SameSite cookies) will protect cross-origin POST and other state-changing methods, but will largely allow GET requests to go through while carrying session cookies.
I thought it'd be this old but memorable article: https://thedailywtf.com/articles/The_Spider_of_Doom