commit:35a4643fdb0e8c9ee53fecf40a6c0e31c2e70303
author:Chip Black
committer:Chip Black
date:Wed Mar 19 00:17:35 2025 -0500
parents:bf16f998fedca46ef63a6bc5524219aad5e3ceb1
Add the host to the seed
diff --git a/http.pl b/http.pl
line changes: +3/-1
index cef2832..c3b60ac
--- a/http.pl
+++ b/http.pl
@@ -50,13 +50,14 @@ my $ROOT = '/';
     sub handle_request {
         my ($self, $cgi) = @_;
 
+        my $host = $cgi->virtual_host();
         my $path = $cgi->path_info();
         
         print "HTTP/1.0 200 OK\r\n";
         print $cgi->header(-charset => 'utf-8');
 
         $path = substr($path, length($ROOT) - 1);
-        Dreamlands::Dreamer::seed($path);
+        Dreamlands::Dreamer::seed("$host$path");
         my $para_count = int(rand(3)) + 2;
         my $content = '';
         for (1..$para_count) {
@@ -66,6 +67,7 @@ my $ROOT = '/';
 
         $tt->process('page.tt', {
             content => $content,
+            host => $host,
             path => $path,
         });
     }