﻿using System;
using Microsoft.AspNetCore.Http;

namespace Hellang.Middleware.SpaFallback
{
    public class SpaFallbackOptions
    {
        public Func<HttpContext, PathString> FallbackPathFactory { get; set; } = _ => "/index.html";

        public bool AllowFileExtensions { get; set; } = false;

        public bool ThrowIfFallbackFails { get; set; } = true;
    }
}

﻿using System;
using Microsoft.AspNetCore.Http;

namespace Hellang.Middleware.SpaFallback
{
    public class SpaFallbackOptions
    {
        private static readonly Func<HttpContext, PathString> DefaultFallbackPathFactory = _ => "/index.html";

        public Func<HttpContext, PathString> FallbackPathFactory { get; set; } = DefaultFallbackPathFactory;

        public bool AllowFileExtensions { get; set; } = false;

        public bool ThrowIfFallbackFails { get; set; } = true;
    }
}

Make default fallback path factory static
Make default fallback path factory static
