I thought you can dye your hair during pregnancy?

But this Glow article says doctors advise against it...?? 🤨🤨 Which is it?