You just need a diode like 1N4148
Put diode reverse between positive and negative (or put it in series in the positive, but I prefered the first method).
If you connect it wrong, reverse polarity, the diode short circuit the PSU and the pedal is protected. Otherwise it should work.
I would not recommend the diode between positive and negative at all.
It is a legacy of early battery powered pedals and is totally unsuitable for use with modern pedal power supplies
- with reverse polarity, the diode short circuits the PSU and burns out and is no longer any protection for the pedal, so the pedal still gets exposed to reverse polarity.
That method only works with power diodes like 1N400x, not small signal like 1N4148, and with batteries or power supplies with current limiting.
Think about it - why on earth would you want to short out your power supply? It is plain stupid.
Series diodes (usually Schottky like 1N5817) or a P-Channel MOSFET (for negative ground and an N-Channel MOSFET for positive ground) are the only proper way of doing it. If you use a shunt diode like you suggest then its best to use a Zener diode and add series resistor or a PTC resettable fuse. That will give overvoltage and reverse voltage protection.