/// <summary>
 /// Initializes a new instance of the <see cref="SslRedirectMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next middleware in the pipeline.</param>
 /// <param name="provider">
 /// The <see cref="ISslRedirector"/> providing the redirect functionality.
 /// </param>
 /// <param name="options">The redirect options.</param>
 public SslRedirectMiddleware(RequestDelegate next, ISslRedirector provider, IOptions <SslRedirectOptions> options)
 {
     _next     = next;
     _options  = options.Value;
     _provider = provider;
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SslRedirector"/> class.
 /// </summary>
 /// <param name="options">The redirect options.</param>
 /// <param name="logger">The <see cref="ILogger"/>.</param>
 public SslRedirector(IOptions <SslRedirectOptions> options, ILogger <SslRedirector> logger)
 {
     _options = options.Value;
     _logger  = logger;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SslRedirectContext"/> class.
 /// </summary>
 /// <param name="context">The HTTP-specific information about the request.</param>
 /// <param name="options">The options for the current request.</param>
 public SslRedirectContext(HttpContext context, SslRedirectOptions options)
 {
     HttpContext = context;
     Options     = options.Clone();
     _fwh        = new Lazy <ForwardedHeader>(() => ForwardedHeader.FromHttpContext(context));
 }