Fix non-html stuff hitting Checkpoint

This commit is contained in:
Caileb 2025-05-29 16:55:40 -05:00
parent aa7da4611b
commit 1025f3b523

View file

@ -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();
}