I’m trying to add the secure flag to my cookies for a web app in Wildfly (version 8.2). In the documentation page of the servlet container settings you’ll find that the children of the “servlet-container” are:
However I only have jsp and websockets. How do I access the session-cookie settings? If I can’t, how to I add the secure flag to my cookies?
UPDATE: I can’t access the web.xml files inside the wars, only wildfly configuration files.
Try following command via jboss-cli:
/subsystem=undertow/servlet-container=default/setting=session-cookie:add(http-only=true,secure=true)
or in your standalone.xml:
<servlet-container name="default">
<session-cookie http-only="true" secure="true"/>
<jsp-config/>
</servlet-container>