RequireHttpsAttribute.HandleNonHttpsRequest Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- filterContext
- AuthorizationFilterContext
The AuthorizationFilterContext to update.
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).