I want to mount a headlight on my handlebar. The handlebar is straight. I have tried a variety of standard bike headlights. These typically come with a quick-release feature. In my usage, which involves high vibration, the quick-release feature eventually allows these lights to shake loose and land on the pavement.
I'm not sure whether my usage involves more vibration than mountain biking. The vehicle in question is actually a Razor push scooter (a/k/a kick scooter - not a footbike, not electric), used on city streets. Its polyurethane wheels and aluminum frame provide no shock absorption. I haven't had this problem with street biking.
If I find a solution to the self-release problem, there may also be a problem of the vibration gradually rotating the light out of position, so that it is pointing up at the sky or down at the ground. The vibration can be pretty bad. It has defeated attempts to control rotation via self-adhering rubber pads.
In the meantime, I do wear a headlamp on my bike helmet. I'd rather have two lights, both for illumination and as a backup. The handlebar is at a good height to minimize shadows.