From aa7da4611bf205ef3a4ccfecc4c75c703a54f5b2 Mon Sep 17 00:00:00 2001
From: Caileb
Date: Thu, 29 May 2025 16:51:04 -0500
Subject: [PATCH 1/2] Reapply "Fix non-html stuff hitting Checkpoint"
This reverts commit c666415b80b2afaed2f4f3d0309389ff177400d6.
---
checkpoint.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checkpoint.js b/checkpoint.js
index 238ea60..69a7e27 100644
--- a/checkpoint.js
+++ b/checkpoint.js
@@ -737,7 +737,7 @@ function CheckpointMiddleware() {
}
}
- // Skip checkpoint for requests that don't accept HTML
+ // Skip checkpoint for requests that don't accept HTML or are for audio/video
if (!req.accepts('html')) {
return next();
}
From 1025f3b523a148ea593fe9bcd178d2f812dd0825 Mon Sep 17 00:00:00 2001
From: Caileb
Date: Thu, 29 May 2025 16:55:40 -0500
Subject: [PATCH 2/2] Fix non-html stuff hitting Checkpoint
---
checkpoint.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/checkpoint.js b/checkpoint.js
index 69a7e27..dd873c8 100644
--- a/checkpoint.js
+++ b/checkpoint.js
@@ -737,8 +737,9 @@ function CheckpointMiddleware() {
}
}
- // Skip checkpoint for requests that don't accept HTML or are for audio/video
- if (!req.accepts('html')) {
+ // Only checkpoint requests explicitly accepting 'text/html'
+ const acceptHeader = request.headers.get('accept') || '';
+ if (!acceptHeader.toLowerCase().includes('text/html')) {
return next();
}