File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class PidApp < Sinatra::Base
4242 username : DATABASE_CONFIG [ 'db_username' ] ,
4343 password : DATABASE_CONFIG [ 'db_password' ]
4444 }
45-
45+
4646 TEST_MODE = false
4747
4848 # If we're in test mode switch to SQLite and a temp Redis secret
@@ -66,8 +66,9 @@ class PidApp < Sinatra::Base
6666 end
6767
6868 configure :development , :production do
69+ PERMITTED_HOSTNAMES = [ APP_CONFIG [ 'app_host' ] ] + ( APP_CONFIG [ 'alt_app_hosts' ] || "" ) . split ( ',' ) . map ( &:strip )
6970 enable :logging
70- set :host_authorization , { permitted_hosts : [ APP_CONFIG [ 'app_host' ] ] }
71+ set :host_authorization , { permitted_hosts : PERMITTED_HOSTNAMES }
7172 end
7273
7374 set :session_secret , SECURITY_CONFIG [ 'session_secret' ]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ application_name: 'PID Service'
55# The server and port where the main PID application will be hosted (comment out the port if you do not need to specify)
66app_host: <%= ENV['APP_HOST'] %>
77app_port: <%= ENV['APP_PORT'] %>
8+ alt_app_hosts: <%= ENV['ALT_APP_HOSTS'] %>
89
910# The url that the system should direct users to when an inactive PID is requested
1011dead_pid_url: <%= ENV['DEAD_PID_URL'] %>
You can’t perform that action at this time.
0 commit comments