mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-12 18:32:44 +00:00
fix: fix content type for typescript
This commit is contained in:
@@ -207,8 +207,10 @@ export default class AnonymizedFile {
|
||||
|
||||
async send(res: Response): Promise<void> {
|
||||
const mime = lookup(this.anonymizedPath);
|
||||
if (mime) {
|
||||
if (mime && this.extension() != "ts") {
|
||||
res.contentType(mime);
|
||||
} else if (this.extension() != "ts") {
|
||||
res.contentType("application/x-typescript");
|
||||
} else if (isTextFile(this.anonymizedPath)) {
|
||||
res.contentType("text/plain");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user