Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <META>
- <POLICY-REFERENCES>
- <POLICY-REF about="/w3c/example-com.p3p#policy1">
- <INCLUDE>/</INCLUDE>
- <COOKIE-INCLUDE/>
- </POLICY-REF>
- </POLICY-REFERENCES>
- </META>
- HTTP/1.1 200 OK
- P3P: policyref="/w3c/p3p.xml", CP="IDC DSP COR IVAi IVDi OUR TST"
- // ... other headers and content
- header('P3P: CP="NOI ADM DEV COM NAV OUR STP"');
- /// <summary>
- /// Privacy Preferences Project (P3P) serve a compact policy (a "p3p" HTTP header) for all requests
- /// P3P provides a standard way for Web sites to communicate about their practices around the collection,
- /// use, and distribution of personal information. It's a machine-readable privacy policy that can be
- /// automatically fetched and viewed by users, and it can be tailored to fit your company's specific policies.
- /// </summary>
- /// <remarks>
- /// More info http://www.oreillynet.com/lpt/a/1554
- /// </remarks>
- public class P3PAttribute : ActionFilterAttribute
- {
- /// <summary>
- /// On Action Executing add a compact policy "p3p" HTTP header
- /// </summary>
- /// <param name="filterContext"></param>
- public override void OnActionExecuting(ActionExecutingContext filterContext)
- {
- HttpContext.Current.Response.AddHeader("p3p","CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"");
- base.OnActionExecuting(filterContext);
- }
- }
- [P3P]
- public class HomeController : Controller
- {
- public ActionResult Index()
- {
- ViewData["Message"] = "Welcome!";
- return View();
- }
- public ActionResult About()
- {
- return View();
- }
- }
Add Comment
Please, Sign In to add comment