Skip to content

Commit

Permalink
Try serving static files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hesketh committed Feb 21, 2024
1 parent 8d80dae commit dcc745b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
6 changes: 6 additions & 0 deletions Website/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Hesketh.MecatolArchives.API.Client.Extensions;
using Hesketh.MecatolArchives.Website.Components;
using Hesketh.MecatolArchives.Website.Services;
using Microsoft.AspNetCore.StaticFiles;
using MudBlazor.Services;

var builder = WebApplication.CreateBuilder(args);
Expand Down Expand Up @@ -31,6 +32,11 @@
if (app.Configuration.GetValue("Https", false))
app.UseHttpsRedirection();

var provider = new FileExtensionContentTypeProvider();
provider.Mappings[".otf"] = "application/x-font-otf";
provider.Mappings[".ttf"] = "font/ttf";

app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });
app.UseStaticFiles();
app.UseAntiforgery();

Expand Down
16 changes: 0 additions & 16 deletions Website/web.config

This file was deleted.

0 comments on commit dcc745b

Please sign in to comment.