Exemplo n.º 1
0
 public ForceHttpsMiddleware(RequestDelegate next, ForceHttpsOptions options)
 {
     _next    = next;
     _options = options;
 }
Exemplo n.º 2
0
        public static IApplicationBuilder UseForceHttps(this IApplicationBuilder app, ForceHttpsOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            return(app.UseMiddleware <ForceHttpsMiddleware>(options));
        }