summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPatrick Rauscher <prauscher@prauscher.de>2023-09-04 20:32:21 +0200
committerNatalia <124304+nessita@users.noreply.github.com>2023-11-02 08:26:27 -0300
commitbf8aac36796165ad6688364089572e642f3a1bd4 (patch)
tree032b6a7e44e8f0c331cb9fbbd96834c441c815c4 /docs
parentfd593db2fa24980ef03f79ffb5b0365a8579eeb8 (diff)
[5.0.x] Fixed #34813 -- Doc'd usage of integrity HTML attribute with ManifestStaticFilesStorage.
Backport of 116e225266c511dfc0bfc96c8497e9c8aaa4d004 from main
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/staticfiles.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index d446f833ea..b7f7239223 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -323,6 +323,16 @@ For example, the ``'css/styles.css'`` file with this content:
@import url("../admin/css/base.27e20196a850.css");
+.. admonition:: Usage of the ``integrity`` HTML attribute with local files
+
+ When using the optional ``integrity`` attribute within tags like
+ ``<script>`` or ``<link>``, its value should be calculated based on the
+ files as they are served, not as stored in the filesystem. This is
+ particularly important because depending on how static files are collected,
+ their checksum may have changed (for example when using
+ :djadmin:`collectstatic`). At the moment, there is no out-of-the-box
+ tooling available for this.
+
You can change the location of the manifest file by using a custom
``ManifestStaticFilesStorage`` subclass that sets the ``manifest_storage``
argument. For example::