Warding Flare in 5e says that it induces disadvantage on attacking creatures by throwing up a light between you and the attacker.
Does that include spell attacks or just physical attacks?
Also at 1st level, you can interpose divine light between yourself and an attacking enemy. When you are attacked by a creature within 30 feet of you that you can see, you can use your reaction to impose disadvantage on the attack roll, causing light to flare before the attacker before it hits or misses. An attacker that can’t be blinded is immune to this feature. You can use this feature a number of times equal to your Wisdom modifier (a minimum of once). You regain all expended uses when you finish a long rest.
pp 61 of the PHB 5e
So that means that so long as the caster is within 30 feet and can be blinded and the spell he/she's casting requires an attack roll.
For example, this effect wouldn't work on a caster casting magic missile or fireball. It also wouldn't work on a caster who has blindsight. It also wouldn't work if the caster were more than 30ft away.
When you are attacked by a creature within 30 feet of you that you can see (PHB 61)
As the feature does not specify that it only works against one or the other, it works against both.