I have developed an SPA app using Aurelia in ASP.NET Core. Right now, I in my startup.cs file I have the following in my configure method:
app.UseIISPlatformHandler();
app.UseApplicationInsightsExceptionTelemetry();
app.UseStaticFiles();
app.UseFileServer(new FileServerOptions
{
EnableDefaultFiles = true,
EnableDirectoryBrowsing = false
});
From what I understand, this app.UseStaticFiles() directs the app to look in the wwwroot folder for a default.html or index.html. I want to somehow do some business logic to check the users windows username and run it through our business logic to check/verify it. Is there a way in which I can just create a home controller and have that controller return the wwwroot/index.html file after it does the proper checking or maybe even accomplish this from within the startup.cs file? If so, can you elaborate on how.
UseFileServer/UseStaticFiles. docs.asp.net/en/latest/fundamentals/…