rails/web-console

Wildcard host for ngrok

alex-benoit opened this issue · 2 comments

When tunneling though a service such as ngrok, your host name is https://*.ngrok.io/, but there is no way to set the wildcard domain as a permitted host. How can I force the web console to run in development, or pass a wildcard domain to the config.web_console.permissions

this monkey patch worked for me

# in config/initializers/web_console.rb
if Rails.env.development?
  module WebConsole
    class Permissions
      def include?(network)
        true
      end
    end
  end
end

webconsole permission system only support network not DNS hosts. The reason for that is to avoid RCE attacks against development Rails applications running locally.