Block camera on 2D map boundaries?

So, on a side scroller, how do i make the camera stop on the boundries so it won’t show outside the map, and still allow the player to move to that corner?