]> git.openstreetmap.org Git - rails.git/commitdiff
Allow trusted addresses for better_errors to be set in the environment
authorTom Hughes <tom@compton.nu>
Sun, 15 Apr 2018 21:22:43 +0000 (22:22 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 15 Apr 2018 21:22:43 +0000 (22:22 +0100)
config/initializers/better_errors.rb [new file with mode: 0644]

diff --git a/config/initializers/better_errors.rb b/config/initializers/better_errors.rb
new file mode 100644 (file)
index 0000000..50f278c
--- /dev/null
@@ -0,0 +1,3 @@
+ENV.fetch("TRUSTED_IPS", "").split.each do |ip|
+  BetterErrors::Middleware.allow_ip! ip
+end