forked from gsamokovarov/web-console
-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
Description
After updating to Rails edge (main branch as of Feb 18, 2026), web-console 4.2.1 crashes on every request with:
NoMethodError: undefined method 'none?' for an instance of WebConsole::Permissions
from actionpack/lib/action_dispatch/middleware/remote_ip.rb:203:in 'block in ActionDispatch::RemoteIp::GetIp#first_non_proxy'
Cause
Rails PR #56805 ("Optimize calculating remote IP address") changed the RemoteIp middleware to call @proxies.none?
instead of using reject:
# New code in first_non_proxy:
@proxies.none? do |proxy|
# ...
endWebConsole::Permissions is passed as the proxies list via config.web_console.allowed_ips, but it only implements include? — not none? or other Enumerable methods.
Suggested Fix
Make Permissions include Enumerable and delegate iteration to @networks:
module WebConsole
class Permissions
include Enumerable
def each(&block)
@networks.each(&block)
end
# ... existing code
end
endEnvironment
- Rails: 8.2.0.alpha (main branch, commit 752cc39 or later)
- web-console: 4.2.1
- Ruby: 3.4.x
Workaround
Add an initializer to patch the class:
# config/initializers/web_console_patch.rb
if defined?(WebConsole::Permissions)
module WebConsole
class Permissions
include Enumerable
def each(&block)
@networks.each(&block)
end
end
end
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels