Commit b879d9bc authored by Keith Jolley's avatar Keith Jolley

REST: Set whether running behind proxy server in options.

parent a30b7053
......@@ -31,7 +31,6 @@ use constant {
PORT => 5432,
USER => 'apache',
PASSWORD => '',
URI_BASE => 'http://rest.pubmlst.org/'
};
#######End Local configuration################################
use Log::Log4perl qw(get_logger); #Also need Log::Dispatch::File
......@@ -43,11 +42,10 @@ my $app = BIGSdb::REST::Interface->new(
config_dir => CONFIG_DIR,
lib_dir => LIB_DIR,
dbase_config_dir => DBASE_CONFIG_DIR,
uri_base => URI_BASE,
host => HOST,
port => PORT,
user => USER,
password => PASSWORD
password => PASSWORD,
}
);
$app->dance;
......@@ -15,9 +15,6 @@ prefs_db=bigsdb_prefs
#Name of authentication database.
auth_db=bigsdb_auth
#Name of database describing resources for REST interface
rest_db=bigsdb_rest
#Specify number of days that job files will remain on server.
results_deleted_days=7
......@@ -44,6 +41,14 @@ disable_update_message=
#URL root to web-accessible documentation.
doclink=http://bigsdb.readthedocs.org/en/latest
###REST INTERFACE###########
#Name of database describing resources for REST interface
rest_db=bigsdb_rest
#Is the REST interface using a PROXY server?
rest_behind_proxy=0
###OFFLINE JOB PROCESSING###
#Name of offline job queue database (if you set this you'll also need to run
......
......@@ -32,7 +32,6 @@ use BIGSdb::REST::Routes::Resources;
use BIGSdb::REST::Routes::Schemes;
use BIGSdb::REST::Routes::Users;
use constant PAGE_SIZE => 100;
set behind_proxy => 1;
sub new {
my ( $class, $options ) = @_;
......@@ -54,9 +53,9 @@ sub new {
bless( $self, $class );
$self->_initiate;
$self->{'dataConnector'}->initiate( $self->{'system'}, $self->{'config'} );
set behind_proxy => $self->{'config'}->{'rest_behind_proxy'} ? 1 : 0;
set serializer => 'JSON'; #Mutable isn't working with Dancer2.
set self => $self;
dance;
return $self;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment