Skip to content

Commit

Permalink
fix content type bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
lennykean committed Feb 5, 2021
1 parent caf7d4e commit 340f446
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mvc/mvc-filter.ts
Expand Up @@ -12,7 +12,7 @@ import { ViewService } from "./view.service.ts";
export class MvcFilter implements MvFilter {
constructor(private readonly viewService: ViewService) {}
async filter(
_contextAccessor: ContextAccessor,
contextAccessor: ContextAccessor,
next: NextFilterFunction,
_parameters: unknown[],
controllerMetadata?: ControllerMetadata,
Expand All @@ -30,6 +30,7 @@ export class MvcFilter implements MvFilter {
if (!result) {
return model;
}
contextAccessor.setHeader("Content-Type", "text/html");
return result;
}
}
2 changes: 1 addition & 1 deletion static-files/static-files-config.ts
Expand Up @@ -12,7 +12,7 @@ export const defaultConfig = {
".ico": "image/x-icon",
".html": "text/html",
".jpeg": "image/jpeg",
".js": ".application/javascript",
".js": "application/javascript",
".json": "application/json",
".mp3": "audio/mpeg",
".mp4": "video/mp4",
Expand Down

0 comments on commit 340f446

Please sign in to comment.