Strapping raw onions to your feet probably won’t do you any harm as long as it isn’t used as a substitute for proper medical care, but there’s no scientific reason to suppose it will cure what’s ailing you, either.
The claim that onions are “toxin absorbers” is pseudo-scientific twaddle, as is the related claim that you should never save a leftover onion because “it will absorb all the toxins in the air of your refrigerator.” This is a revised version of an older rumor to the effect that “onions are a huge magnet for bacteria,” therefore, supposedly, “it’s not even safe if you put it in a zip-lock bag.”