-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Use case
The site admin at AwesomeMedia™ started getting complaints about one of the site's many "second-hand" third parties. Reports say that it is behaving badly: delivering excessive amounts of data, slowing down the entire site, stealing private info or even (gasp) delivering malware to its users. However, AwesomeMedia™ doesn't include that content directly. Instead it is coming from thirdpartymanager.com, which was breached/tricked/bribed into letting this bad-behaving content through.
Obviously, our brave admin wants to stop sending this content to their users ASAP.
Today their options are fairly limited:
either remove thirdpartymanager.com entirely from the wide range of sites they manage (which would cost AwesomeMedia a lot of money until this is resolved), or call their contact on thirdpartymanager.com and yell at them until it is fixed (which can take a while as they may be sleeping, on vacation, or just slow to respond).
What our admin really wishes they had is a magical HTTP header that permits them to tell the browser "if you see requests for this host, block them immediately!". They could then add these headers to their responses, and kill the rogue third party, while letting through others.
That doesn't negate the need to have a tough conversation with thirdpartymanager.com, but that can happen after the users are safe.
Proposal
Current CSP syntax doesn't include a way to tell the browser to block a certain host while letting through all others. I believe it should.
I propose the addition of a new directive block
which value is a source list, where all sources in that list would be blocked whenever an attempted request towards these sources is made.
/cc @mikewest