Delen via


RequireHttpsAttribute.HandleNonHttpsRequest Method

Definition

Called from OnAuthorization(AuthorizationFilterContext) if the request is not received over HTTPS. Expectation is Result will not be null after this method returns.

protected:
 virtual void HandleNonHttpsRequest(Microsoft::AspNetCore::Mvc::Filters::AuthorizationFilterContext ^ filterContext);
protected virtual void HandleNonHttpsRequest (Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext filterContext);
abstract member HandleNonHttpsRequest : Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext -> unit
override this.HandleNonHttpsRequest : Microsoft.AspNetCore.Mvc.Filters.AuthorizationFilterContext -> unit
Protected Overridable Sub HandleNonHttpsRequest (filterContext As AuthorizationFilterContext)

Parameters

Remarks

If it was a GET request, default implementation sets Result to a result which will redirect the client to the HTTPS version of the request URI. Otherwise, default implementation sets Result to a result which will set the status code to 403 (Forbidden).

Applies to