Changeset 41 in bookmarks for trunk/BookmarkApp.pm


Ignore:
Timestamp:
05/30/13 15:15:05 (11 years ago)
Author:
peter
Message:
  • move the reverse proxy check and change to SERVER_NAME from the BookmarkApp to the index.cgi script
  • the dbname is passed in as a parameter to BookmarkApp
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BookmarkApp.pm

    r40 r41  
    1111use Bookmarks; 
    1212use URI; 
    13  
    14 my $dbname = 'fk.db'; 
    1513 
    1614sub setup { 
     
    2422        edit 
    2523    }]); 
     24 
    2625    my $base_uri = URI->new; 
    2726    $base_uri->scheme('http'); 
    28     $base_uri->host($ENV{HTTP_X_FORWARDED_HOST} || $ENV{SERVER_NAME}); 
     27    $base_uri->host($ENV{SERVER_NAME}); 
    2928    $base_uri->port($ENV{SERVER_PORT}); 
    3029    $base_uri->path($ENV{SCRIPT_NAME} . '/'); 
    3130 
    3231    my $bookmarks = Bookmarks->new({ 
    33         dbname   => $dbname, 
     32        dbname   => $self->param('dbname'), 
    3433        base_uri => $base_uri, 
    3534    }); 
Note: See TracChangeset for help on using the changeset viewer.