<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I&#39;m trying to intercept the way that cookies are being written in Undertow. The idea is to do something like can be done with a cookie rewrite rule in Apache (like e.g. add or replace something to the domain attribute of each and every cookie being written).<br>
<br></div>After some hacking on the Undertow code it became clear that HttpServerExchange#setResonseCookie is the central place where cookies arrive.<br><br></div>However, HttpServerExchange is a final class, so can&#39;t (easily) be wrapped. If HttpServerExchange only had a setResponseCookies method then handlers could install a special map that does the rewriting, making this a fairly easy task.<br>
<br></div>What do you think? Would it be a good idea to add such a method. or is there an other way to easily do something like this?<br><br></div>Kind regards,<br>Arjan Tijms<br></div>