fix: normalize content type by converting file extension to lowercase (#4375)

This commit is contained in:
大表哥 2025-02-17 11:06:23 +08:00 committed by GitHub
parent 8bc2a5362e
commit 7d522955ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ export class ExpressFileServerContribution implements ServerAppContribution {
const filePath = URI.parse(`file://${uriPath}`).codeUri.fsPath;
const whitelist = this.getWhiteList();
const contentType = ALLOW_MIME[path.extname(filePath).slice(1)];
const contentType = ALLOW_MIME[path.extname(filePath).slice(1).toLowerCase()];
if (
/**
*