0

we built a webapp. On IE we need to allow third party cookies. We are using Java Server Faces. Anyway we are looking for the best way to deliver the P3P-Header? We thought about Apache configuration files. Is it possible to detect InternetExplorer on this level or is it better to check for browser in the application?

Thanks in advance.

Jochen
  • 1,746
  • 4
  • 22
  • 48
  • 1
    I usually do it like this: `response.addHeader("P3P", "CP=\"CAO PSA OUR\"");` Indiscriminately of the client browser. – Twilite Nov 19 '12 at 14:45

2 Answers2

2

Since it should be a static P3P policy, the elegant way would be to put it in the Apache config with

BrowserMatch . . 
Header . . .  env=
Akber Choudhry
  • 1,755
  • 16
  • 24
  • Great akberc, I found this link, which describes the command. Unfortunately I did not configure Apache-Tomcat-Environment up to now. I am using Eclipse and XAMPP on a Windows machine - in which file I have to put in the directive? – Jochen Nov 19 '12 at 14:56
  • Forgot to add the link: http://attaboy.tumblr.com/post/227153662/on-internet-explorer-7-cookies-iframes-and-privacy – Jochen Nov 19 '12 at 15:09
  • 1
    `\xampp\apache\conf\httpd.conf` – Akber Choudhry Nov 19 '12 at 15:41
0

Okay, this works for me (at the end of Apache http.conf, set-header-module is enabled):

BrowserMatch MSIE IS_MSIE
Header add P3P "CP=\"NOI DSP COR CURa ADMa DEVa OUR IND OTC\"" env=IS_MSIE
Jochen
  • 1,746
  • 4
  • 22
  • 48