Ok, found it

final SessionCookieConfig sessionCookieConfig = 
environment.getApplicationContext().getServletContext().getSessionCookieConfig();
sessionCookieConfig.setSecure(true);
sessionCookieConfig.setHttpOnly(true);


On Monday, 24 October 2016 10:54:31 UTC+1, Samuel Durand wrote:
>
> Hi, I am trying to configure the servlet so that it will set some specific 
> flags (httpOnly and Secure) on the JSESSIONID cookie.
> If I was using tomcat or most other JavaEE stacks container I would simply 
> add to the Web.xml file : 
>
> <session-config>
>     <cookie-config>
>         <secure>true</secure>
>         <http-only>true</http-only>
>     </cookie-config>
> </session-config>
>
>
>
> But using Dropwizard I didn't find any way yet to do do the same using the 
> Environment.getJersey.property or the yaml configuration file.
>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to