brake reservoir

Is the front reservoir for the front or rear brakes? i have mine connected to the rear brakes. is this correct or am i an accident waiting to happen? thanks