简体   繁体   English

Tomcat上的土耳其urlrewrite过滤器不会设置P3P

[英]Turkey urlrewrite filter on Tomcat will not set P3P

I am trying to get Confluence 4.1.5 to work properly with IE 8, 9 and 10 with redirect from a SSO. 我正在尝试让Confluence 4.1.5与IE 8、9和10一起正常工作,并具有来自SSO的重定向。 In other words - we've hit the Privacy Policy issue (P3P). 换句话说-我们已经解决了隐私政策问题(P3P)。

No, I'm not a Tomcat guy. 不,我不是Tomcat家伙。 But I found some references that (I believe) told me what to do: 但是我发现一些参考(我相信)告诉我该怎么做:

http://grokbase.com/t/tomcat/users/111exnp658/how-to-configure-tomcat-coyote-to-deliver-a-p3p-header-on-every-request http://grokbase.com/t/tomcat/users/111exnp658/how-to-configure-tomcat-coyote-to-deliver-a-p3p-header-on-every-request

https://code.google.com/p/urlrewritefilter/ https://code.google.com/p/urlrewritefilter/

Based on this I was able to establish that Confluence standard installation both has: 基于此,我能够确定Confluence标准安装都具有:

  • The urlrewrite filter jar in place urlrewrite过滤器罐就位
  • The class set in web.xml 在web.xml中设置的类
  • An existing urlrewrite.xml with some stuff from Atlassian 现有的urlrewrite.xml以及Atlassian的一些东西

So I tried to add the following to the urlrewrite.xml file: 因此,我尝试将以下内容添加到urlrewrite.xml文件中:

<rule>
     <from>/*</from>
     <set type="response-header" name="P3P">CP="NON DSP COR ADM OUR STP"</set>
</rule>

This however did not work very well. 但是,这不是很好。 To test I inserted some spelling errors (!!) and got an error message in Confluence logs. 为了测试,我插入了一些拼写错误(!!),并在Confluence日志中收到一条错误消息。 So I know that the file is read. 因此,我知道该文件已读取。 However, I do not understand why my p3p isn't set (I have verified with IE and Firefox. The p3p value set on eg www.w3.org is not similarly set when I navigate Confluence). 但是,我不明白为什么未设置我的p3p(我已经通过IE和Firefox进行了验证。当我浏览Confluence时,例如在www.w3.org上设置的p3p值也没有类似设置)。

I've opened a support case with Atlassian. 我已经打开了Atlassian的支持案例。 But they basically state that "this is not under the support agreement" which I guess I kind of agree on. 但是他们基本上说“这不在支持协议之内”,我想我对此表示同意。

So - can someone guide me in the right direction? 所以-有人可以指引我正确的方向吗? Will this never work? 这将永远行不通吗? Am I missing a crucial part? 我是否缺少关键部分?

Please not, for anyone answering, that I am really not acquainted with Tomcat at all, so consider me a Newb when you answer :) 请不要,对于任何回答的人,我真的一点都不熟悉Tomcat,因此当您回答时,请考虑将我视为Newb :)

Thank you in advance. 先感谢您。

I had a second look at the web.xml file for the urlrewrite entry. 我再次查看了web.xml文件中的urlrewrite条目。 I found that Atlassian had added specific settings for the filter to kick in. So "my" rules never actually kicked in. I changed these to /* and verified that it now worked as expected. 我发现Atlassian已为启动过滤器添加了特定设置。因此“我的”规则从未真正启动。我将它们更改为/ *并验证它现在可以正常工作。

<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <!--<url-pattern>/s/*</url-pattern>-->
    <url-pattern>/*</url-pattern>
</filter-mapping>

Now I have to figure out Atlassians intention with the /s/* (I know what they do, but I do not know why they added this. Test installation seems to run just fine). 现在,我必须弄清楚/ s / *的Atlassians意图(我知道他们在做什么,但我不知道他们为什么添加此功能。测试安装似乎运行良好)。

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

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