Code cleanup
This commit is contained in:
parent
54fe97c2c7
commit
e8a558632c
|
@ -23,10 +23,6 @@ namespace webmusic {
|
|||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public static void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
provider.Mappings[".flac"] = "audio/flac";
|
||||
provider.Mappings[".m3u"] = "audio/m3u";
|
||||
provider.Mappings[".opus"] = "audio/opus";
|
||||
if (env.IsDevelopment()) {
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
@ -36,10 +32,11 @@ namespace webmusic {
|
|||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions {ContentTypeProvider = provider});
|
||||
var provider = new FileExtensionContentTypeProvider { Mappings = { [".flac"] = "audio/flac", [".m3u"] = "audio/m3u", [".opus"] = "audio/opus" } };
|
||||
app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });
|
||||
app.UseCookiePolicy();
|
||||
|
||||
app.UseMvc();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue