✨ feat: allow disabling CSP, following the hierarchy
Introduces new option `enable_csp`, true by default. Can be set on a page, section or globally.
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
"show_previous_next_article_links",
|
||||
"invert_previous_next_article_links",
|
||||
"previous_next_article_links_full_width",
|
||||
"enable_csp",
|
||||
] %}
|
||||
|
||||
<table>
|
||||
|
@@ -143,7 +143,9 @@
|
||||
|
||||
<meta property="og:site_name" content="{{ config.title }}">
|
||||
|
||||
{%- include "partials/content_security_policy.html" -%}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="enable_csp", page=page | default(value=""), section=section | default(value=""), default_global_value="true") == "true" -%}
|
||||
{%- include "partials/content_security_policy.html" -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if config.extra.theme_switcher and config.extra.theme_switcher == true -%}
|
||||
{# If JavaScript is disabled, hide the button. #}
|
||||
|
Reference in New Issue
Block a user