namespace Eis.Web.Frontend;

public static class FrontendAssets
{
    public static void MapFrontendAssets(this WebApplication app)
    {
        app.UseDefaultFiles();
        app.UseStaticFiles(new StaticFileOptions
        {
            OnPrepareResponse = context => context.Context.Response.Headers.CacheControl = "no-cache"
        });
        app.MapFallbackToFile("index.html");
    }
}
