Replace blanket cors_origin() with validate_origin() that checks the incoming Origin header against allowed origins (host IP + dev server). Unknown origins no longer receive Access-Control-Allow-Origin headers. Also added X-CSRF-Token to allowed CORS headers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>