PHP Classes

CSP Generator Class

Recommend this page to a friend!

      PHP Content Security Policy generator  >  All threads  >  CSP Generator Class  >  (Un) Subscribe thread alerts  
Subject:CSP Generator Class
Summary:CSP Generator script issue
Messages:2
Author:seema sharma
Date:2014-11-27 06:20:53
 

  1. CSP Generator Class   Reply   Report abuse  
Picture of seema sharma seema sharma - 2014-11-27 06:20:53

I have executed provided class with example, it shows following error on example1.php page

Fatal error: Can't use function return value in write context in C:\wamp\www\csp-generator\CSPGenerator.php on line 203


Please let me know the solution.

  2. Re: CSP Generator Class   Reply   Report abuse  
Picture of Tom Postma Tom Postma - 2014-11-27 11:27:57 - In reply to message 1 from seema sharma
I have updated the class it should be fixed.

Using UseCanonicalName On on apache server configuration is now a requirement for safe use. If this setting is off and cannot be turned on, i recommend replacing $_SERVER['SERVER_NAME'] with the a hardcoded FQDN constant.