Depends a little on the rack.
+1 for disc brake adapters, but realistically any small piece of sheet metal with two holes in it and some nyloc nuts/threadlocker and you're good to go after some fettling
I cut a slot in two old canti brake pad mounts, made a little bracket out of scrap alloy and it sits a supernova e3 (heavy) off front and between a front rack very solidly, hasn't moved in two years of abuse
Anyone got a good bodge for fitting a dynamo light to the front of a rack? Need something solid enough that the light won't be bent forwards!