You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using System;using System.Collections.Generic;using System.Linq;using System.Threading.Tasks;using Microsoft.AspNetCore.Mvc;using Microsoft.AspNetCore.Mvc.Filters;using Microsoft.Extensions.Logging;using Microsoft.AspNetCore.Authorization;namespace Shentun.WebPeis.WebApiServer{ //public class RequireHttpsAttribute : AuthorizationFilterAttribute
//{
// public override void OnAuthorization(HttpActionContext actionContext)
// {
// if (actionContext.Request.RequestUri.Scheme != Uri.UriSchemeHttps)
// {
// actionContext.Response = new HttpResponseMessage(System.Net.HttpStatusCode.Forbidden)
// {
// ReasonPhrase = "HTTPS Required"
// };
// }
// else
// {
// base.OnAuthorization(actionContext);
// }
// }
//}
}
|