You need to create another (new) domain on your DataPower for http to https proxy (I suggest you don't do that on production).
Create Multi-Protocol Gateway and a Multi-Protocol Gateway policy
add the following XSL as a rule. (notice to replace my-awesome-lb with your LB on top of your gateway/s, or if it's one then the DNS or IP address of it)
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dp="http://www.datapower.com/extensions"
xmlns:regexp="http://exslt.org/regular-expressions"
extension-element-prefixes="dp" exclude-result-prefixes="dp regexp">
<xsl:template match="/">
<xsl:variable name="protocol" select="dp:variable('var://service/protocol')" />
<xsl:if test="$protocol != 'https'">
<xsl:variable name="hostHeader" select="dp:http-request-header('Host')" />
<xsl:variable name="newUrlLocation" select="concat('https://my-awesome-lb.com', concat(substring-after($hostHeader,'http://'), dp:variable('var://service/URI')))" />
<dp:set-variable name="'var://service/routing-url'" value="$newUrlLocation" />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
- Go to advanced and make sure you have the following:
