Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-Security-Policy: script-src 'self' 'sha256-".base64_encode(hash('sha256', 'console.log("HI");', true))."'");
- ?><!DOCTYPE html>
- <html>
- <head>
- <title>CSP</title>
- <meta charset="utf-8" />
- </head>
- <body>
- Hello, content-security-policy!
- <script type='text/javascript'>console.log("HI");</script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement