[Seaside] [vw7.4.1]Limit to localhost?

Brian Murphy-Dye brian.murphydye at mac.com
Tue Jan 9 22:41:45 UTC 2007


Another option is to use a trick Michal Bany gave me a while back to  
find out the requester's ip address, and render something different  
for localhost:

renderContentOn: html
    self session currentRequest nativeRequest remoteAddress =  
(ByteArray with: 127 with: 0 with: 0 with: 1)
        ifTrue: [html render: insideComponent]
        ifFalse: [html render: outsideComponent]

Michal notes that VW uses:  self session currentRequest nativeRequest  
remoteAddr

Brian.


On Jan 9, 2007, at 4:53 PM, Alan Knight wrote:

> If you're using the Seaside for WebToolkit, when you create the  
> server using the server console, you'll notice there's a section  
> for hostname, and a checkbox for "bind to all interfaces". If you  
> turn off that checkbox, and enter an interface name, then that  
> server will only serve connections coming from that particular  
> interface. So if you specify localhost, it shouldn't be visible  
> from outside. Note that the checkbox is only there when creating  
> the server, not when editing it.
>
> At 02:49 PM 1/9/2007, Carl Gundel wrote:
>> What would be the simplest way to modify Seaside so that it can be  
>> programmed to respond differently to requests from localhost  
>> versus other IP addresses?  I want to create a personal version of  
>> my app that cannot be used to serve other computers, but instead  
>> only the computer it is running on.  I realize that this approach  
>> can be fooled by using a proxy server, but it is a start.
>>
>> -Carl Gundel, author of Liberty BASIC
>> http://www.libertybasic.com
>>
>> _______________________________________________
>> Seaside mailing list
>> Seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> --
> Alan Knight [|], Cincom Smalltalk Development
> knight at acm.org
> aknight at cincom.com
> http://www.cincom.com/smalltalk
>
> "The Static Typing Philosophy: Make it fast. Make it right. Make it  
> run." - Niall Ross
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the Seaside mailing list