FLEXDEPLOY_HSTS setting in setenvoverride.sh (Linux) or setenvoverride.bat (Windows). Edit that file under <FlexDeploy Home>/apache-tomcat-flexdeploy/bin, then restart Tomcat for the change to take effect.
When enabled, FlexDeploy toggles the HSTS filter in Tomcat’s root conf/web.xml (<FlexDeploy Home>/apache-tomcat-flexdeploy/conf/web.xml). That applies the Strict-Transport-Security header at the server root (/) and for all applications, not only under the FlexDeploy web context. @Since 11.1.0.4
This is a one-time change. Upgrade does not modify setenvoverride.sh / setenvoverride.bat, so your HSTS and cookie settings remain in place after upgrades.
By default, HSTS is disabled (HTTP connections are allowed).
-
Set
FLEXDEPLOY_HSTSto1to enable HSTS (HTTPS-only browser connections). -
Set
FLEXDEPLOY_HSTSto0to disable HSTS (allows HTTP connections).
Linux
Insetenvoverride.sh, uncomment and set:
Windows
Insetenvoverride.bat, uncomment and set:
Secure session cookies
If you enable HSTS, you should also setFLEXDEPLOY_COOKIE_SECURE=1 in the same setenvoverride file so session cookies require HTTPS (or a load balancer using HTTPS).