Skip to content

Commit

Permalink
Remove config.web_console.permissions initial value.
Browse files Browse the repository at this point in the history
config.web_console.permissions initial value is not need.
Because Webconsole::Permissions have ALWAYS_PERMITTED_NETWORKS.
  • Loading branch information
patorash committed May 27, 2019
1 parent 0bab235 commit 6336c89
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/web_console/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
module WebConsole
class Railtie < ::Rails::Railtie
config.web_console = ActiveSupport::OrderedOptions.new
config.web_console.permissions = %w( 127.0.0.1 ::1 )

initializer "web_console.initialize" do
require "bindex"
Expand Down Expand Up @@ -53,9 +52,8 @@ class Railtie < ::Rails::Railtie
end

initializer "web_console.permissions" do
if permissions = config.web_console.whitelisted_ips || config.web_console.permissions
Request.permissions = Permissions.new(permissions)
end
permissions = config.web_console.permissions || config.web_console.whitelisted_ips
Request.permissions = Permissions.new(permissions)
end

initializer "web_console.whiny_requests" do
Expand Down

0 comments on commit 6336c89

Please sign in to comment.