aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJieiku2022-05-29 21:39:14 -0700
committerJieiku2022-05-31 03:03:09 -0700
commitaa2be1a0f14eb9499843a094bb59b97a66297fd9 (patch)
tree0bc660ad0f10f1f1f0ddfe9285e43b2eb59b3b3a /templates
parent40934841435a65aac4e5335d7e377e0430d57f3e (diff)
downloadabridge-aa2be1a0f14eb9499843a094bb59b97a66297fd9.tar.gz
abridge-aa2be1a0f14eb9499843a094bb59b97a66297fd9.tar.bz2
abridge-aa2be1a0f14eb9499843a094bb59b97a66297fd9.zip
Add integrity sha-384 hash to js search scripts
Diffstat (limited to 'templates')
-rw-r--r--templates/macros/head.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 82e7100..f893ef3 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -18,10 +18,10 @@
{%- if config.build_search_index %}
{%- if config.extra.js_search_index %}
- <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"></script>
+ <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}" integrity="sha384-{{ get_file_hash(path=config.extra.js_search_index, sha_type=384, base64=true) | safe }}"></script>
{%- endif %}
{%- if config.extra.js_search %}
- <script defer src="{{ get_url(path=config.extra.js_search, trailing_slash=false, cachebust=true) | safe }}"></script>
+ <script defer src="{{ get_url(path=config.extra.js_search, trailing_slash=false, cachebust=true) | safe }}" integrity="sha384-{{ get_file_hash(path=config.extra.js_search, sha_type=384, base64=true) | safe }}"></script>
{%- endif %}
{%- endif %}