/** * Cache-Busting Middleware for Obsidian Web Interface * * This module provides dynamic asset versioning to force browser cache invalidation * on every server restart by intercepting HTML responses and injecting cache-busting * query parameters into all JavaScript file references. * * Architecture Pattern: Cache-Busting via Query Parameters * - Build timestamp is generated at server startup * - All JS files get ?v=TIMESTAMP appended * - Browser treats each timestamp as a unique resource * - Cannot be cached across deployments */ const fs = require('fs'); const path = require('path'); /** * Generate cache-busted HTML by adding timestamp to all