Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HttpContext.Current.Response.AppendHeader("P3P", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
- public static void RegisterRoutes(RouteCollection routes)
- {
- HttpContext.Current.Response.AppendHeader("P3P", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
- routes.MapRoute(
- "Default", // Route name
- "{controller}/{action}/{id}", // URL with parameters
- new { controller = "Account", action = "Logon", id = UrlParameter.Optional }
- );
- }
- <system.webServer>
- <httpProtocol>
- <customHeaders>
- <add name="P3P" value='CP="CAO PSA OUR"'/>
- public class P3PHeaderAttribute : ActionFilterAttribute
- {
- public override void OnActionExecuted(ActionExecutedContext filterContext)
- {
- filterContext.HttpContext.Response.AppendHeader("P3P", "CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"");
- }
- }
- public static void RegisterGlobalFilters(GlobalFilterCollection filters)
- {
- filters.Add(new P3PHeaderAttribute());
- }
Add Comment
Please, Sign In to add comment