If your AEM installation requires that all cookies be flagged with secure attribute, then you can enable that via the Web Console Configuration Manager.
Environment
AEM 6.4,6.5
Steps
Open http://host:port/system/console/configMgr/org.apache.felix.http