So, I have java webapp that uses tomcat with apache proxy level. I want all cookies set in the app to have the httpOnly flag. The problem is that tomcat is responsible for setting the flag on the application side, and its default value (in api 2.5 servlets) is false. I was hoping I could set this flag for all cookies on the fly using apache.
I tried different combinations, and the closest I received sets the last cookie sent by httpOnly, which of course is wrong:
Header append Set-Cookie "; HttpOnly"
I have no way of knowing which cookies / values ββwill be sent from the application. Is it possible?
source share