Lonnie Abelbeck wrote:
> On Sep 17, 2008, at 1:58 AM, Philip Prindeville wrote:
>   
>> Lonnie Abelbeck wrote:
>>     
>>> On Sep 16, 2008, at 8:26 AM, David Kerr wrote:
>>>       
>>>> 2) I asked for, and Lonnie implemented, a way to launch the  
>>>> asterisk-
>>>> gui from the web interface. Lonnie created a field into which I
>>>> could enter any URL and a link appears in the top right.  What is
>>>> the right naming convention for this URL if I want to have the gui
>>>> substitute the URL base name rather than hardcode a IP address or
>>>> name (like "pbx")... in otherwords, the "link" URL needs to be
>>>> different depending on whether I access the Astlinux box through the
>>>> EXTIF or the INTIF.
>>>>
>>>>         
>>> The only solution I can think of is to configure your DNS servers to
>>> map the same the same name to get forwarded to the same box.
>>>
>>> My first thought (with only one cup of coffee) was to use localhost,
>>> but that won't work since the name is resolved in your browser.
>>>
>>> The connection is your browser  => altweb versus your browser =>
>>> asterisk-gui, and they use different web servers.
>>>
>>> I don't see any other way.
>>>
>>>       
>> You can just serve back whatever prefix came in the original GET
>> request, right?
>>
>> If the user said:
>>
>> http://host.mydomain.com/foo
>>
>> then return something starting with http://host.mydomain.com/ and if  
>> he
>> said:
>>
>> http://192.168.1.1/foo
>>
>> then return something starting with http://192.168.1.1/ -- this will
>> also make it more compatible with reverse-proxy servers operating
>> through a NATting gateway.
>>
>> -Philip
>>     
>
> Philip, I think I understand what you are saying...
>
> Use the $_SERVER['HTTP_HOST'] to generate the public host and the  
> Prefs tab URL string for the local path... in this special case.
>
> Possibly if the user specified http://localhost/bla..bla, I could  
> replace "://localhost" with ://$_SERVER['HTTP_HOST'], since localhost  
> would normally have no application in an HTML anchor href=
>
> Anyone see a problem with this?
>
> Lonnie
>   

But the user never would specify "http://localhost/..."; would he?

-Philip


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to