Question

I have a small little swf that I'm trying to get to work while the webpage is using https/ssl. I'm passing into the swf the fact that the page is using https and have conditional logic as such:

if ( secure ) {
        pollChannel = new AMFChannel('my-secure-polling-amf','https://' + globalDomain + '/flex2gateway/cfamfpollingsecure');
    }
    else {
        pollChannel = new AMFChannel('cf-polling-amf','http://' + globalDomain + '/flex2gateway/cfamfpolling');
    }

When the page is http it uses the correct endpoint no problem. When secure == true for whatever reason the browser is reporting its using http://somedomain.local/flex2gateway/cfamfpollingsecure, not https.

what i see in the browser tools

Anybody have a clue why??? I don't understand why it would adjust itself like that.

Any help is much appreciated!

Was it helpful?

Solution

Lucky for you I had the exact same mystery issue last week and the fix is extremely simple (once you know where to look, that is; I've been digging through the source code for a while to figure it out):

you just have to use SecureAMFChannel instead of the regular AMFChannel

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top