We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6336c89 commit aa67b70Copy full SHA for aa67b70
test/web_console/railtie_test.rb
@@ -21,6 +21,18 @@ class RailtieTest < ActiveSupport::TestCase
21
end
22
23
24
+ test "config.permissions sets whitelisted networks by whitelisted_ips" do
25
+ new_uninitialized_app do |app|
26
+ app.config.web_console.whitelisted_ips = %w( 172.16.0.0/12 192.168.0.0/16 )
27
+ app.initialize!
28
+
29
+ 1.upto(255).each do |n|
30
+ assert_includes Request.permissions, "172.16.0.#{n}"
31
+ assert_includes Request.permissions, "192.168.0.#{n}"
32
+ end
33
34
35
36
test "config.permissions always includes localhost" do
37
new_uninitialized_app do |app|
38
app.config.web_console.permissions = "8.8.8.8"
0 commit comments