Skip to content

Commit e3e8a24

Browse files
committed
fix(linter-findings): Reformat readme and add justification for semgrep mute on turnstile import
1 parent e7c8bf2 commit e3e8a24

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

app/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ <h1>Shorten a link</h1>
125125
<a href="https://jacksec.engineer" target="_blank"> Made by Jack </a>
126126
</div>
127127
<script src="https://{{ cdn }}/main.js" integrity="sha384-+mgxv/j8PS4LqfbANhG2Iy3ZROxiOMvFDK5SAzv2RzFAl/VXX4baZgpmUVEENxS/" crossorigin="anonymous"></script>
128+
<!-- nosemgrep: missing-integrity - SRI cannot be applied to this third-party Cloudflare Turnstile script as the file contents are managed and updated by Cloudflare. Adding an integrity hash would break the captcha whenever Cloudflare updates the script. -->
128129
<script
129130
src="https://challenges.cloudflare.com/turnstile/v0/api.js"
130131
async

readme.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ for f in app/static/*; do echo "$(basename $f): sha384-$(openssl dgst -sha384 -b
141141
```
142142

143143
> [!IMPORTANT]
144-
> If you upload modified static files to your dev R2 bucket without updating the `integrity` attributes in the HTML templates, the browser will block those resources from loading. After updating the `integrity` attributes in the templates, you must rebuild the container with `docker compose up -d --build` for the changes to take effect. In production, you must also purge the Cloudflare cache for any updated files, otherwise the CDN will continue serving the old version. This can be done in the Cloudflare dashboard under Caching > Configuration > Custom Purge, entering the full URL of each updated file.
144+
> If you upload modified static files to your dev R2 bucket without updating the `integrity` attributes in the HTML templates, the browser will block those resources from loading.
145+
> After updating the `integrity` attributes in the templates, you must rebuild the container with `docker compose up -d --build` for the changes to take effect.
146+
> In production, you must also purge the Cloudflare cache for any updated files, otherwise the CDN will continue serving the old version.
147+
> This can be done in the Cloudflare dashboard under Caching > Configuration > Custom Purge, entering the full URL of each updated file.
145148
146149
## Developed by [Jack](https://jacksec.engineer)

0 commit comments

Comments
 (0)