This paper presents a universal approach to shaping the mechanical properties of the interaction between a collaborative robot and its environment through an end-effector Cartesian compliance shaping. More specifically, the focus is on the class of kinematically redundant robots, for which a novel redundancy reconfiguration scheme for online optimization of the Cartesian compliance of the end-effector is presented. The null-space reconfiguration aims to enable the more efficient and versatile use of collaborative robots, including robots with passive compliant joints. The proposed approach is model-based and gradient-based to enable real-time computation and reconfiguration of the robot for Cartesian compliance while ensuring accurate position tracking. The optimization algorithm combines two coordinate frames: the global (world) coordinate frame commonly used for end-effector trajectory tracking; and the coordinate frame fixed to the end-effector in which optimization is computed. Another attractive feature of the approach is the bound on the magnitude of the interaction force in contact tasks. The results are validated on a torque-controlled 7-DOF KUKA LWR robot emulating joint compliance in a quasi-static experiment (the robot exerts a force on an external object) and a peg-in-hole experiment emulating an assembly task.