Exemple #1
0
        public static IApplicationBuilder UseRequireSslRedirect(this IApplicationBuilder app, RequireSslOptions options = null)
        {
            if (options == null)
            {
                options = RequireSslOptions.Default();
            }

            return(app.UseMiddleware <RequireSslMiddleware>(Options.Create(options)));
        }
Exemple #2
0
 public RequireSslMiddleware(RequestDelegate next, IOptions <RequireSslOptions> options)
 {
     _next    = next;
     _options = options.Value;
 }