We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c0b457 commit 3fdc59bCopy full SHA for 3fdc59b
1 file changed
config/initializers/verify_config.rb
@@ -0,0 +1,15 @@
1
+# Check that the app is configured correctly. Raise some helpful errors if something is wrong.
2
+
3
+if Rails.env.production? and ['localhost', 'production.localhost'].include?(Discourse.current_hostname)
4
+ puts <<END
5
6
+ Discourse.current_hostname = '#{Discourse.current_hostname}'
7
8
+ Please update the host_names property in config/database.yml
9
+ so that it uses the hostname of your site. Otherwise you will
10
+ experience problems, like links in emails using #{Discourse.current_hostname}.
11
12
+END
13
14
+ raise "Invalid host_names in database.yml"
15
+end
0 commit comments