Need updated help with using security policy header

I want to use the security policy header on my site. I found your page with the instructions on how to do this. Unfortunately, it is badly out of date and the javascript example and description in the article looks nothing like my js. Can you provide updated information on this?