paragonie / csp-builder

Build Content-Security-Policy headers from a JSON file (or build them programmatically)
https://paragonie.com/projects
MIT License
544 stars 39 forks source link

Omit plugin-types directive when empty #10

Closed Furgas closed 8 years ago

Furgas commented 8 years ago

According to https://www.w3.org/TR/CSP/#directive-plugin-types and https://www.w3.org/TR/CSP/#media_type_list the plugin-types directive should be omitted when empty.

Example warning from Chrome with plugin-types: 'none': Invalid plugin type in 'plugin-types' Content Security Policy directive: ''none''. Did you mean to set the object-src directive to 'none'?

Also included some other trivial changes.

paragonie-scott commented 8 years ago

Thanks.