admin.appserverSetEnableHstsHeader( config as element(configuration), appserver-id as (Number|String), value as Boolean ) as element(configuration)
This function sets if HSTS header will be included in HTTPS response.
http://marklogic.com/xdmp/privileges/admin/app-server-security
http://marklogic.com/xdmp/privileges/admin/app-server-security/{id}
http://marklogic.com/xdmp/privileges/admin/group-security
http://marklogic.com/xdmp/privileges/admin/group-security/{id}
const admin = require('/MarkLogic/admin.xqy'); var config = admin.getConfiguration() var groupid = admin.groupGetId(config, "Default") admin.appserverSetEnableHstsHeader(config, admin.appserverGetId(config, groupid, "myAppServer"),fn.true())