'Is there a way to prevent basic auth from popping inside iframe other than white list?

I'm looking for a way to forbid basic auth from popping inside an iframe and the only option I see is the creation of a white list inside the CSP but it doesn't suit my needs. Are there any other options available? Sandbox in iframe can't forbid basic auth to go through obviously.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source