Function __global->load_csp
Definitions
sources/csp.php
- Load up CSP settings.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $options | ?array | No | No | Null | N/A | N/A | Overrides for options; any non-set properties will result in no-change to the current CSP state or if for a new state CSP_VERY_STRICT (null: load full clean state from configuration) |
| $enable_more_open_html_for | ?MEMBER | No | No | Null | N/A | N/A | Allow more open HTML for a particular member ID (null: no member). It still will use the HTML blocklist functionality (unless they have even higher access already), but will remove the more restrictive safelist functionality. Should only be used with CSP_PRETTY_STRICT/CSP_VERY_STRICT which will further decreasing the risk from dangerous HTML, even though the risk should be very low anyway due to the blocklist filter. |
Preview
Code (PHP)
/**
* Load up CSP settings.
*
* @param ?array $options Overrides for options; any non-set properties will result in no-change to the current CSP state or if for a new state CSP_VERY_STRICT (null: load full clean state from configuration)
* @param ?MEMBER $enable_more_open_html_for Allow more open HTML for a particular member ID (null: no member). It still will use the HTML blocklist functionality (unless they have even higher access already), but will remove the more restrictive safelist functionality. Should only be used with CSP_PRETTY_STRICT/CSP_VERY_STRICT which will further decreasing the risk from dangerous HTML, even though the risk should be very low anyway due to the blocklist filter.
*/
function load_csp(?array $options = null, ?int $enable_more_open_html_for = null)
* Load up CSP settings.
*
* @param ?array $options Overrides for options; any non-set properties will result in no-change to the current CSP state or if for a new state CSP_VERY_STRICT (null: load full clean state from configuration)
* @param ?MEMBER $enable_more_open_html_for Allow more open HTML for a particular member ID (null: no member). It still will use the HTML blocklist functionality (unless they have even higher access already), but will remove the more restrictive safelist functionality. Should only be used with CSP_PRETTY_STRICT/CSP_VERY_STRICT which will further decreasing the risk from dangerous HTML, even though the risk should be very low anyway due to the blocklist filter.
*/
function load_csp(?array $options = null, ?int $enable_more_open_html_for = null)
