We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dbff5c commit 01e9af2Copy full SHA for 01e9af2
src/BE/Program.cs
@@ -11,6 +11,7 @@
11
using Microsoft.AspNetCore.Mvc;
12
using System.Runtime.CompilerServices;
13
using Chats.BE.Services.FileServices;
14
+using Microsoft.AspNetCore.StaticFiles;
15
16
[assembly: InternalsVisibleTo("Chats.BE.Tests")]
17
@@ -81,6 +82,13 @@ public static async Task Main(string[] args)
81
82
app.MapControllers();
83
app.UseMiddleware<FrontendMiddleware>();
84
app.UseStaticFiles();
85
+ app.UseStaticFiles(new StaticFileOptions()
86
+ {
87
+ ContentTypeProvider = new FileExtensionContentTypeProvider(new Dictionary<string, string>
88
89
+ [".avif"] = "image/avif",
90
+ })
91
+ });
92
93
// before run:
94
await app.Services.GetRequiredService<InitService>().Init();
0 commit comments