Changeset 41 in bookmarks for trunk/index.cgi


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/index.cgi

    r30 r41  
    1919 
    2020package main; 
    21 BookmarkApp::Dispatch->dispatch(); 
     21# check for whether we are behind a reverse proxy, and adjust the SERVER_NAME accordingly 
     22# TODO: use something like Plack::Middlware::ReverseProxy instead 
     23$ENV{SERVER_NAME} = $ENV{HTTP_X_FORWARDED_HOST} if $ENV{HTTP_X_FORWARDED_HOST}; 
     24 
     25BookmarkApp::Dispatch->dispatch( 
     26    args_to_new => { 
     27        #TODO: dbname should be in a config file 
     28        PARAMS => { dbname => 'fk.db' }, 
     29    } 
     30); 
Note: See TracChangeset for help on using the changeset viewer.