zendframework / zend-http

Http component from Zend Framework
BSD 3-Clause "New" or "Revised" License
134 stars 85 forks source link

Add missing directives in CSP #175

Closed MadCat34 closed 4 years ago

MadCat34 commented 5 years ago

Provide a narrative description of what you are trying to accomplish:

Some directives are missing in Fetch directive

And some Navigation, Document and Reporting directives are missing.

Code to reproduce the issue

$csp = new ContentSecurityPolicy();
$csp->setDirective('worker-src', ['https://*.google.com', 'http://foo.com']);
$csp->toString();

Actual result

Throw a Exception\InvalidArgumentException

New result

toString() should return "Content-Security-Policy: worker-src https://*.google.com http://foo.com;"

This PR fixes #163

michalbundyra commented 4 years ago

Thanks, @MadCat34!

MadCat34 commented 4 years ago

Thanks, @michalbundyra