简体   繁体   English

如何让Apache仅在响应上设置P3P标头?

[英]How to have apache only set P3P header on responses?

So we have a foreign site that's pulling in a cookie and login widget from our domestic site. 因此,我们有一个外国站点正在从我们的国内站点引入cookie和登录小部件。 Since the foreign site is .de, but our domestic site is .com it treats our login widget request as a third party cookie. 由于外部站点是.de,而我们的内部站点是.com,因此它将我们的登录小部件请求视为第三方Cookie。 To get around this we're using mod_header in apache 2.2 which works, but it's being set on every request. 为了解决这个问题,我们在apache 2.2中使用了有效的mod_header,但是它是在每个请求上设置的。 We'd like to find a way for it to only be set on responses that are setting cookies. 我们想找到一种仅在设置cookie的响应上进行设置的方法。 Below is what we have currently. 以下是我们目前拥有的。 Is there any way to narrow it down? 有什么办法可以缩小范围?

Header set P3P 'CP="This is not a P3P policy! See our privacy statement here http://www.example.com/example/cms/lang/en/site/products/home/privacy-statement"

I think you actually need to set up this header on every resource on your external iframe look here . 我觉得你确实需要建立在每一个资源这头在你的外部的iframe看这里 This resolved the problem I had with P3P also 这也解决了我在P3P中遇到的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM