Skip to content

Commit

Permalink
Add map static assets to the template
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercn committed May 8, 2024
1 parent 7a9dd36 commit 55cd29c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public static void Main(string[] args)
app.UseHttpsRedirection();

#endif
app.UseStaticFiles();
app.UseAntiforgery();

app.MapStaticAssetEndpoints();
#if (UseServer && UseWebAssembly)
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@
app.UseHttpsRedirection();

#endif
app.UseStaticFiles();

app.UseAntiforgery();

app.MapStaticAssetEndpoints();
#if (UseServer && UseWebAssembly)
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ public static void Main(string[] args)
#else
}
#endif
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapStaticAssetEndpoints();
app.MapRazorPages();
#if (IndividualB2CAuth || OrganizationalAuth)
app.MapControllers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@
#else
}
#endif
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapStaticAssetEndpoints();
app.MapRazorPages();
#if (IndividualB2CAuth || OrganizationalAuth)
app.MapControllers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public static void Main(string[] args)

app.UseAuthorization();

app.MapStaticAssetEndpoints();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@
#else
}
#endif
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapStaticAssetEndpoints();

app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
Expand Down

0 comments on commit 55cd29c

Please sign in to comment.