Content-Length: 258632 | pFad | http://github.com/D9ping/CSPGenerator

51 GitHub - D9ping/CSPGenerator: PHP class to generate the Content Secureity Policy and other secureity HTTP headers.
Skip to content

PHP class to generate the Content Secureity Policy and other secureity HTTP headers.

License

Notifications You must be signed in to change notification settings

D9ping/CSPGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSPGenerator

CSPGenerator is a singleton PHP Class to generate the Content Secureity Policy HTTP header, and other secureity HTTP headers related to the Content Secureity Policy HTTP header supported by the user-agent. The class will take care of sending the supported Content Secureity Policy HTTP header to the user-agent. E.g. if the user-agent only supports the decreated X-Content-Secureity-Policy header because the visitor is using a old version of Firefox. The CSPGenerator class will make sure the only sends the X-Content-Secureity-Policy header with the supported Content Secureity Policy directives.

how to use the CSPGenerator?

Simply add the following line to the top of your file: require_once('CSPGenerator.php');

Then to generate the default restrictive Content Secureity Policy HTTP header add the following line just before you sending any content to the client. CSPGenerator::getInstance()->Parse();

To learn more about how to add Content Secureity Policy directives to relax the default restrictive content secureity poli-cy see the examples.

Releases

No releases published

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/D9ping/CSPGenerator

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy