mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
DEV: Allow custom hosts in development mode
Rails 6 seems to introduce a whitelist of allowed hosts. I personally use `dev.local` for development and this no longer works. This introduces a new ENV variable, `DISCOURSE_DEV_HOST`. If present, it will whitelist that host for development mode.
This commit is contained in:
parent
321f559c7c
commit
95a9a544c9
|
@ -41,6 +41,7 @@ Discourse::Application.configure do
|
|||
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
|
||||
|
||||
config.load_mini_profiler = true
|
||||
config.hosts << ENV['DISCOURSE_DEV_HOST'] if ENV['DISCOURSE_DEV_HOST']
|
||||
|
||||
require 'middleware/turbo_dev'
|
||||
config.middleware.insert 0, Middleware::TurboDev
|
||||
|
|
Loading…
Reference in New Issue
Block a user