File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,6 +304,8 @@ export class FilesystemLoader implements MetadataLoader {
304304
305305 /**
306306 * Generate ETag for content
307+ * Uses SHA-256 hash truncated to 32 characters for reasonable collision resistance
308+ * while keeping ETag headers compact (full 64-char hash is overkill for this use case)
307309 */
308310 private generateETag ( content : string ) : string {
309311 const hash = createHash ( 'sha256' ) . update ( content ) . digest ( 'hex' ) . substring ( 0 , 32 ) ;
Original file line number Diff line number Diff line change @@ -328,6 +328,8 @@ export class MetadataManager {
328328
329329 /**
330330 * Generate ETag for content
331+ * Uses SHA-256 hash truncated to 32 characters for reasonable collision resistance
332+ * while keeping ETag headers compact (full 64-char hash is overkill for this use case)
331333 */
332334 private generateETag ( content : string ) : string {
333335 const hash = createHash ( 'sha256' ) . update ( content ) . digest ( 'hex' ) . substring ( 0 , 32 ) ;
You can’t perform that action at this time.
0 commit comments