11diff --git a/build.js b/build.js
2- index 0c6ed8e2c0949c93978dd1a244baa9bf2448e9b8..08a9347cfdca06e6a97077ea4582c5b0922ecb2d 100644
2+ index 3734120d67745ff83b2df07fa5d0a40dcb92a69b..7bfb6faa81ccfcb9016fd2b071a2f93b24e75479 100644
33--- a/build.js
44+++ b/build.js
55@@ -35,7 +35,7 @@ function viaCache(cache, uri, extns) {
@@ -11,15 +11,15 @@ index 0c6ed8e2c0949c93978dd1a244baa9bf2448e9b8..08a9347cfdca06e6a97077ea4582c5b0
1111 let i=0, arr=toAssume(uri, extns);
1212 let abs, stats, name, headers;
1313 for (; i < arr.length; i++) {
14- @@ -43 ,6 +43 ,7 @@ function viaLocal(dir, isEtag, uri, extns) {
14+ @@ -46 ,6 +46 ,7 @@ function viaLocal(dir, isEtag, uri, extns) {
1515 if (abs.startsWith(dir) && fs.existsSync(abs)) {
1616 stats = fs.statSync(abs);
1717 if (stats.isDirectory()) continue;
1818+ if (shouldServe && !shouldServe(abs)) continue;
1919 headers = toHeaders(name, stats, isEtag);
2020 headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
2121 return { abs, stats, headers };
22- @@ -176 ,7 +177 ,7 @@ module.exports = function (dir, opts={}) {
22+ @@ -179 ,7 +180 ,7 @@ module.exports = function (dir, opts={}) {
2323 catch (err) { /* malform uri */ }
2424 }
2525
@@ -29,7 +29,7 @@ index 0c6ed8e2c0949c93978dd1a244baa9bf2448e9b8..08a9347cfdca06e6a97077ea4582c5b0
2929
3030 if (isEtag && req.headers['if-none-match'] === data.headers['ETag']) {
3131diff --git a/build.mjs b/build.mjs
32- index 3ad14d45630a8627b93842a04a96465120d3f223..8451277c015b56a7d2cb99aaee3a318d9c0893dd 100644
32+ index 2f866d5216c951ec125f2044af070fa6b530e375..a4dfae6d0738568b4f9b86fdfbec47c94562957c 100644
3333--- a/build.mjs
3434+++ b/build.mjs
3535@@ -35,7 +35,7 @@ function viaCache(cache, uri, extns) {
@@ -41,15 +41,15 @@ index 3ad14d45630a8627b93842a04a96465120d3f223..8451277c015b56a7d2cb99aaee3a318d
4141 let i=0, arr=toAssume(uri, extns);
4242 let abs, stats, name, headers;
4343 for (; i < arr.length; i++) {
44- @@ -43 ,6 +43 ,7 @@ function viaLocal(dir, isEtag, uri, extns) {
44+ @@ -46 ,6 +46 ,7 @@ function viaLocal(dir, isEtag, uri, extns) {
4545 if (abs.startsWith(dir) && fs.existsSync(abs)) {
4646 stats = fs.statSync(abs);
4747 if (stats.isDirectory()) continue;
4848+ if (shouldServe && !shouldServe(abs)) continue;
4949 headers = toHeaders(name, stats, isEtag);
5050 headers['Cache-Control'] = isEtag ? 'no-cache' : 'no-store';
5151 return { abs, stats, headers };
52- @@ -176 ,7 +177 ,7 @@ export default function (dir, opts={}) {
52+ @@ -179 ,7 +180 ,7 @@ export default function (dir, opts={}) {
5353 catch (err) { /* malform uri */ }
5454 }
5555
0 commit comments