brake warning switch

Yup. It gets wired to both.
But heres the thing. It gets wired to what is commonly called a proportioning valve. That valve may or may not be a proportioning valve. It depends what its out of and how its configured. If it has an electrical connector on it, then thats what you wire it to. The light will indicate when there is an imbalance in pressures between the front and rear hydraulic circuits of a dual brake system. Such as when you blow a brake hose. Of course when that happens, you will know it, as the pedal goes down and the car is harder to stop. So the light will be confirming what you already know. But if a hard line is leaking, or there is another non-catastrophic leak, it will inform you of that as well. And that would be a good thing.