public override void OnActionExecuting(HttpActionContext actionContext) { if (!actionContext.ModelState.IsValid) { HttpResponseHelper.CreateBadRequestResponse(actionContext, actionContext.ModelState); } }
public override void OnActionExecuting(HttpActionContext actionContext) { if (DebugUtils.IsDebugging) { return; } if (actionContext.Request.RequestUri.Scheme != Uri.UriSchemeHttps) { HttpResponseHelper.CreateBadRequestResponse(actionContext, "HTTPS is required to access this site"); return; } }