Skip to content

Commit 7d52295

Browse files
authored
fix: normalize content type by converting file extension to lowercase (#4375)
1 parent 8bc2a53 commit 7d52295

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/express-file-server/src/node/express-file-server.contribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class ExpressFileServerContribution implements ServerAppContribution {
3232

3333
const filePath = URI.parse(`file://${uriPath}`).codeUri.fsPath;
3434
const whitelist = this.getWhiteList();
35-
const contentType = ALLOW_MIME[path.extname(filePath).slice(1)];
35+
const contentType = ALLOW_MIME[path.extname(filePath).slice(1).toLowerCase()];
3636
if (
3737
/**
3838
* 地址在白名单内

0 commit comments

Comments
 (0)