Do not serve index.html files at / URLs
This actually broke some old behavior in packages that publish index.html files but aren't counting on unpkg to serve them. Closes #130
This commit is contained in:
parent
5fac968215
commit
9dbe412783
|
@ -84,10 +84,6 @@ function searchEntries(tarballStream, entryName, wantsIndex) {
|
|||
// and the client wants HTML.
|
||||
if (
|
||||
entry.name === entryName ||
|
||||
// Allow accessing e.g. `/index.html` using `/`
|
||||
(wantsIndex &&
|
||||
entry.name ===
|
||||
(entryName === "" ? "index.html" : `${entryName}/index.html`)) ||
|
||||
// Allow accessing e.g. `/index.js` or `/index.json` using
|
||||
// `/index` for compatibility with CommonJS
|
||||
(!wantsIndex && entry.name === `${entryName}.js`) ||
|
||||
|
|
Loading…
Reference in New Issue