Securing BlazeDS (https)

I wanted to set up a flex/BlazeDS app to ONLY use https and not http at all!

Key lies in setting up the channels in two places:

1) In services-config.xml, comment out the normal my-amf channel and leave the my-secure-amf only


<channel-definition id=”my-amf”>
<endpoint url=”http://{}:{server.port}/{context.root}/messagebroker/amf”/>
<channel-definition id=”my-secure-amf”>
<endpoint url=”https://{}:{server.port}/{context.root}/messagebroker/amfsecure”/>

2) Secondly comment out the same details in the remoting-config.xml file

<channel ref=”my-secure-amf”/>
<!–          <channel ref=”my-amf”/> –>

That’s it. Deploy and check. the first screen on http may appear, but nothing thereafter will work unless you use https://