Skip to content

Instantly share code, notes, and snippets.

@etoxin
Created July 25, 2017 01:33
Show Gist options
  • Save etoxin/72e1d94c66abd7a18613aded5be8526d to your computer and use it in GitHub Desktop.
Save etoxin/72e1d94c66abd7a18613aded5be8526d to your computer and use it in GitHub Desktop.
Content-Security-Policy-Report-Only
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta http-equiv="Content-Security-Policy" content="default-src https://ajax.googleapis.com; child-src 'none'; object-src 'none';">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
<h1>test</h1>
<script>
console.log('jQuery Blocked:', '$' in window && 'fn' in window.$);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment