forked from fixin.me/fixin.me
Allow Capybara test server IP in HostAuthorization
This commit is contained in:
@@ -47,13 +47,13 @@ module FixinMe
|
|||||||
# SETUP: Below settings need to be updated on a per-installation basis.
|
# SETUP: Below settings need to be updated on a per-installation basis.
|
||||||
#
|
#
|
||||||
# Set host to be used by links generated in mailer templates.
|
# Set host to be used by links generated in mailer templates.
|
||||||
config.action_mailer.default_url_options = {host: 'localhost', :protocol => 'https'}
|
config.action_mailer.default_url_options = {host: 'localhost', protocol: 'https'}
|
||||||
# https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
|
# https://guides.rubyonrails.org/configuring.html#config-action-mailer-delivery-method
|
||||||
config.action_mailer.delivery_method = :sendmail
|
config.action_mailer.delivery_method = :sendmail
|
||||||
|
|
||||||
# List of hosts this app is available at.
|
# List of hosts this app is available at.
|
||||||
# https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization
|
# https://guides.rubyonrails.org/configuring.html#actiondispatch-hostauthorization
|
||||||
config.hosts += ['localhost', IPAddr.new('1.2.3.4/32'), 'example.com']
|
config.hosts |= ['localhost']
|
||||||
|
|
||||||
# Email address of admin account
|
# Email address of admin account
|
||||||
config.admin = 'admin@localhost'
|
config.admin = 'admin@localhost'
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ Rails.application.configure do
|
|||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
|
|
||||||
# Set host to be used by links generated in mailer templates.
|
# Set host to be used by links generated in mailer templates.
|
||||||
config.action_mailer.default_url_options = { host: 'localhost', protocol: 'http' }
|
config.action_mailer.default_url_options = {host: Capybara.server_host,
|
||||||
|
protocol: 'http'}
|
||||||
|
|
||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
@@ -46,5 +47,8 @@ Rails.application.configure do
|
|||||||
# Raise error when a before_action's only/except options reference missing actions.
|
# Raise error when a before_action's only/except options reference missing actions.
|
||||||
config.action_controller.raise_on_missing_callback_actions = true
|
config.action_controller.raise_on_missing_callback_actions = true
|
||||||
|
|
||||||
|
# Allow Capybara application server IP
|
||||||
|
config.hosts |= [IPAddr.new(Capybara.server_host)]
|
||||||
|
|
||||||
config.log_level = :info
|
config.log_level = :info
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user