That's a poor solution. You want the mounting bolts to see a shearing force, where they are strong, rather than a bending moment by cantilevering the rack outboard of the fork and putting washers/spacers to fill the gap. In any hard use that will result in a bent mounting bolt which will eventually fail.
OMM's approach puts the mounting hardware in shear and will work with any disc brake bike [see front rack image below - that rack is going on 7yrs on my LHT]. Some bikes like the Surly Pugsley allow for a hard mount to the frame using alternate braze ons to get around disc rotors [shown above] this works well.
Ultimately you can put racks on a disc brake bike - just be critical of the design as many folks are simply selling slightly tweaked conventional racks with the spacers noted above that are not robust enough for serious use.
BTW - fenders mounted with a spacer on the disc caliper side are fine since the mounting hardware doesn't see significant loads.
For a cheap solution this works fine...if you don't want to spend $140 on a front rack. It's strong and has gone through a few tours now.