File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 # Show full error reports.
1313 config . consider_all_requests_local = true
1414
15+ # Allowed hosts
16+ if ENV [ "ALLOWED_HOST_REGEX" ] . present?
17+ config . hosts << Regexp . new ( ENV [ 'ALLOWED_HOST_REGEX' ] )
18+ end
19+ if ENV [ 'HOST_NAME' ] . present?
20+ config . hosts << ENV [ 'HOST_NAME' ]
21+ end
22+
1523 # Enable/disable caching. By default caching is disabled.
1624 # Run rails dev:cache to toggle caching.
1725 if Rails . root . join ( "tmp" , "caching-dev.txt" ) . exist?
Original file line number Diff line number Diff line change 1717 config . consider_all_requests_local = true
1818 config . action_controller . perform_caching = true
1919
20+ # Allowed hosts
21+ if ENV [ "ALLOWED_HOST_REGEX" ] . present?
22+ config . hosts << Regexp . new ( ENV [ 'ALLOWED_HOST_REGEX' ] )
23+ end
24+ if ENV [ 'HOST_NAME' ] . present?
25+ config . hosts << ENV [ 'HOST_NAME' ]
26+ end
27+
2028 # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
2129 # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
2230 # config.require_master_key = true
Original file line number Diff line number Diff line change 2323 config . consider_all_requests_local = true
2424 config . action_controller . perform_caching = false
2525
26+ # Allowed hosts
27+ if ENV [ "ALLOWED_HOST_REGEX" ] . present?
28+ config . hosts << Regexp . new ( ENV [ 'ALLOWED_HOST_REGEX' ] )
29+ end
30+ if ENV [ 'HOST_NAME' ] . present?
31+ config . hosts << ENV [ 'HOST_NAME' ]
32+ end
33+
2634 # Raise exceptions instead of rendering exception templates.
2735 config . action_dispatch . show_exceptions = false
2836
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ SECRET_KEY_BASE="beefaroni"
77RAILS_ENV = development
88PUMA_ENV = development
99
10+ # If both ALLOWED_HOSTS_REGEX and HOST_NAME are populated, both will be allowed
11+ # ALLOWED_HOSTS_REGEX=/.*\.compute\.amazonaws\.com/
12+ ALLOWED_HOSTS_REGEX =
13+ HOST_NAME =
14+
1015BUNDLE_GEMFILE = Gemfile
1116# BUNDLE_PATH=/app/scholarspace/bundle
1217CH12N_TOOL = fits_servlet
@@ -70,4 +75,4 @@ AWS_ACCESS_KEY=
7075AWS_SECRET_KEY =
7176S3_BUCKET_NAME =
7277# Optional -- for pointing Fedora to a specific path within a bucket
73- S3_PREFIX =
78+ S3_PREFIX =
You can’t perform that action at this time.
0 commit comments