I have not seen a pump mounted on a fork, but I have seen pumps mounted on a seat stay. I don’t consider either ideal, because of the potential for the pump bumping loose, especially on rough terrain, and lodging between the wheel and the fork blade, or chain stay.
The big difference is what happens to the rider when the wheel suddenly stops. Neither is good, but when a front wheel suddenly stops the rider doesn’t.
John