Fix non-html stuff hitting Checkpoint
This commit is contained in:
parent
aa7da4611b
commit
1025f3b523
1 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue