From 92a95518b6649a7ed427d486a41935fbd041a9c2 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Tue, 31 May 2022 01:06:59 -0700
Subject: Security Headers
---
templates/base.html | 6 +++---
templates/macros/head.html | 8 ++++++++
2 files changed, 11 insertions(+), 3 deletions(-)
(limited to 'templates')
diff --git a/templates/base.html b/templates/base.html
index 1b396cb..f056486 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -18,7 +18,7 @@
{%- endif %}
{%- endblock seo %}
{{- macros_head::favicons() }}
-
+ {{- macros_head::security() }}
@@ -46,9 +46,9 @@
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 0107b83..3ea785a 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -194,6 +194,14 @@
{#- Extra SEO END #}
{%- endmacro %}
+{%- macro security() %}
+ {%- if config.extra.security_headers %}
+ {#- options: no-referrer, same-origin, strict-origin, strict-origin-when-cross-origin #}
+
+ {%- endif %}
+{%- endmacro %}
+
+
{%- macro math() %}
{%- if config.extra.katex_enabled %}
--
cgit v1.3.1