set-config action is used to override settings of the current configuration at runtime.
The action expects configuration elements as child nodes. It has no attributes.
<flow><!-- Secure checkout --><set-config if="contains($request/url, '/checkout')"><security><force-backend-https enable="true"/></security><url-rewriting><force-https/></url-rewriting></set-config>…</flow>
The given configuration elements are merged with the existing settings in
conf/config.xml. If a config element is already set, their attributes are merged. Otherwise, the element is copied into the configuration.
enable attribute is not explicitly defined for a setting,
enable="true" is assumed. Therefore, the following examples are equivalent:
Although the config syntax forbids the redeclaration of settings, you may override the same setting with
set-config actions multiple times.
📎 Be aware that the config settings are evaluated at different points of time. Some settings, such as
security/force-client-httpsare evaluated before the flow starts. Others, such as
force-backend-httpsaffect requests that may run at any time in the flow. Changing those settings with
set-configafter they are used, will have no effect. However, most options are used after the flow.