| Module | ActionController |
| In: |
lib/116.rb
lib/123.rb lib/reverse_proxy_fix.rb |
Reverse proxy fix for Rails 1.2.3
Configure the prefix on the url only if we‘re running in production mode Throws an exception if the BASE_URL constant has not been configured in config.rb
# File lib/116.rb, line 8
8: def self.check_mode_and_base
9: if RAILS_ENV == 'production'
10: begin
11: BASE_URL
12: rescue
13: raise "You need to configure your base url. See the reverse_proxy_fix/lib/config.rb file to set this value!"
14: end
15: else
16: return false
17: end
18: end
Configure the prefix on the url only if we‘re running in production mode Throws an exception if the BASE_URL constant has not been configured in config.rb
# File lib/123.rb, line 8
8: def self.check_mode_and_base
9: if RAILS_ENV == 'production'
10: begin
11: BASE_URL
12: rescue
13: raise "You need to configure your base url. See the reverse_proxy_fix/lib/config.rb file to set this value!"
14: end
15: else
16: return false
17: end
18: end
Configure the prefix on the url only if we‘re running in production mode Throws an exception if the BASE_URL constant has not been configured in config.rb
# File lib/reverse_proxy_fix.rb, line 8
8: def self.check_mode_and_base
9: if RAILS_ENV == 'production'
10: begin
11: BASE_URL
12: rescue
13: raise "You need to configure your base url. See the reverse_proxy_fix/lib/config.rb file to set this value!"
14: end
15: else
16: return false
17: end
18: end