Use the Plack::Request object to get the server hostname.
This commit is contained in:
parent
73319bf6c0
commit
7057e92248
1 changed files with 1 additions and 3 deletions
|
|
@ -171,9 +171,7 @@ sub _visitors {
|
|||
my $ip_clause;
|
||||
|
||||
# Check whether instance of Apache2::ServerRec is available
|
||||
if($session->server) {
|
||||
# Query hostname of server
|
||||
my $hostname = $session->server->server_hostname();
|
||||
if(my $hostname = $session->request->uri->host) {
|
||||
|
||||
# Look up server IP addresses
|
||||
my $res = Net::DNS::Resolver->new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue