-
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Closed
Copy link
Milestone
Description
Lines 434 to 455 in 1c65860
| getFileContentType(filepath, res) { | |
| let contentType = res.getHeader("Content-Type"); | |
| // Content-Type might be already set via middleware | |
| if (contentType) { | |
| return contentType; | |
| } | |
| let mimeType = mime.getType(filepath); | |
| if (!mimeType) { | |
| return; | |
| } | |
| contentType = mimeType; | |
| // We only want to append charset if the header is not already set | |
| if (contentType === "text/html") { | |
| contentType = `text/html; charset=${this.options.encoding}`; | |
| } | |
| return contentType; | |
| } |
https://hachyderm.io/@TheRealNooshu/114514184401582133
Reported by @Nooshu
Metadata
Metadata
Assignees
Labels
No labels