|
Home > Archive > Macromedia Flash Server > November 2005 > Reject by URL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Airton Toyansk 2005-11-23, 5:45 pm |
| Hi, everyone!
How can I create a condition that verifies if the user is accessing my app
through a specific domain? If not, it rejects the connection. I intend to
protect my server side code...
Thanks in advanced,
Airton Toyansk.
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Michael Weck 2005-11-23, 5:45 pm |
| Something like this would work...
application.onConnect = function(client,userObject){
if(client.referrer == undefined){
trace("User rejected, no referrer");
this.rejectConnection(client);
return;
}
if(client.referrer.search('http://www.yourdomain.com')==-1){
trace("New user rejected, invalid referrer url for flash client " +
client.referrer);
this.rejectConnection(client);
return;
}
application.acceptConnection(client);
}
Regards,
Mike
Airton Toyansk wrote:
> Hi, everyone!
>
> How can I create a condition that verifies if the user is accessing my
> app through a specific domain? If not, it rejects the connection. I
> intend to protect my server side code...
>
> Thanks in advanced,
>
> Airton Toyansk.
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
| |
| Woody Chastain 2005-11-23, 5:45 pm |
| Check out the XML configuration files. I think you can limit access to
particular IP addresses.
-----Original Message-----
From: flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org
[mailto:flashcomm-bounces-1Ss2GqJETD3yZ38Mhd3e/9ZfFG6BLHNm@public.gmane.org] On Behalf Of Michael Weck
Sent: Wednesday, November 23, 2005 12:29 PM
To: FlashComm Mailing List
Subject: Re: [FlashComm] Reject by URL
Something like this would work...
application.onConnect = function(client,userObject){
if(client.referrer == undefined){
trace("User rejected, no referrer");
this.rejectConnection(client);
return;
}
if(client.referrer.search('http://www.yourdomain.com')==-1){
trace("New user rejected, invalid referrer url for flash
client " +
client.referrer);
this.rejectConnection(client);
return;
}
application.acceptConnection(client);
}
Regards,
Mike
Airton Toyansk wrote:
> Hi, everyone!
>
> How can I create a condition that verifies if the user is accessing my
> app through a specific domain? If not, it rejects the connection. I
> intend to protect my server side code...
>
> Thanks in advanced,
>
> Airton Toyansk.
>
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
|
|
|
|
|