How to access flex app over https but connect to backend using http

Many application needs to be accessed over secure connection, but only need to connect to the backend using non-secure connection, or vice versa. How do we accomplish that?

Secure connections can talk to secure and non-secure endpoints. Non-secure connections can only talk to non-secure endpoints. So you will need to configure your channel differently.

1. If the app is requested over https and then use http to connect to backend:

<channel-definition id=”my-amf-secure” class=”mx.messaging.channels.SecureAMFChannel“>
<endpoint uri=”https://{server.name}:{server.port}{context.root}/flex2gateway/” class=”flex.messaging.endpoints.AMFEndpoint “/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
</properties>
</channel-definition>

2. If the flex app is requested over http, then using https to connect backend:
<channel-definition id=”my-amf” class=”mx.messaging.channels.SecureAMFChannel“>
<endpoint uri=”https://{server.name}:{server.port}{context.root}/flex2gateway/” class=”flex.messaging.endpoints.SecureAMFEndpoint“/>
<properties>
<add-no-cache-headers>false</add-no-cache-headers>
</properties>
</channel-definition>

3. For LCDS 2.5 and 2.5.1, the configuration would be enough.
For FDS 201, you need to apply the hotfix build 168076 as well. You can get the build 168076 from flex Tech support.