RickStrahl / AlbumViewerVNext

West Wind Album Viewer ASP.NET Core and Angular Sample
505 stars 353 forks source link

404 error for .woff2 static files #8

Closed mchubby closed 7 years ago

mchubby commented 7 years ago

Symptoms

Opening a woff2 URL such as http://localhost:26448/fontawesome-webfont.af7ae505a9eed503f8b8.woff2 results in 404 error.

Diagnosis

The web.config "wwwroot-static" rule https://github.com/RickStrahl/AlbumViewerVNext/blob/2807706094163f69380f4caab91172d220046d95/src/AlbumViewerNetCore/web.config#L11 is not greedy enough.

According to the development custom error, the rewritten URL points to wwwroot\fontawesome-webfont.af7ae505a9eed503f8b8.woff (notice missing trailing digit)

Proposed Fix

Invert order in match expression:

<match url="([\S]+[.](html|htm|svg|js|css|png|gif|jpg|jpeg|woff2|woff))" />
RickStrahl commented 7 years ago

Previously fixed on the .NET Core 2.0 branch.

mchubby commented 6 years ago

Hi Rick,

It seems the fix never made its way to master: https://github.com/RickStrahl/AlbumViewerVNext/commits/master/src/AlbumViewerNetCore/web.config

Would you mind merging it again?