Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Commit 1ddd343

Browse files
committed
cherry-pick changes from 5.x core
1 parent 7e4a78d commit 1ddd343

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/plugins/static.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ function serveStatic(options) {
4444

4545
function serveFileFromStats(file, err, stats, isGzip, req, res, next) {
4646
if (err) {
47-
next(new ResourceNotFoundError(err,
48-
req.path()));
47+
next(new ResourceNotFoundError(err, '%s', req.path()));
4948
return;
5049
} else if (!stats.isFile()) {
5150
next(new ResourceNotFoundError('%s does not exist', req.path()));
@@ -125,12 +124,12 @@ function serveStatic(options) {
125124
}
126125

127126
if (!re.test(file.replace(/\\/g, '/'))) {
128-
next(new NotAuthorizedError(req.path()));
127+
next(new NotAuthorizedError('%s', req.path()));
129128
return;
130129
}
131130

132131
if (opts.match && !opts.match.test(file)) {
133-
next(new NotAuthorizedError(req.path()));
132+
next(new NotAuthorizedError('%s', req.path()));
134133
return;
135134
}
136135

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"Ben Hale",
1414
"Ben Hutchinson",
1515
"Benjamine Coe",
16+
"Benjamin Urban",
1617
"Blake VanLandingham",
1718
"Bryce Kahle",
1819
"Christopher Cannell",

0 commit comments

Comments
 (0)