On Jan 9, 2008, at 6:16 AM, Octavian Rasnita wrote:

Is it possible to get the host name in MyApp.pm just like I can do it in a controller using

$c->req->hostname;

I want to use the current hostname for setting the cookie in the session, and the site could be accessed with 2 or more different host names. If I hard-code a certain hostname, the login won't work on other host names.

$c->req->hostname doesn't return the server hostname, it returns the client hostname.

Can't the current host that was requested be accessed in MyApp.pm?


$c->req->header( 'Host' );

--
Jason Kohles, RHCA RHCDS RHCE
[EMAIL PROTECTED] - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to