White Listing REMOTE_ADDR for better_errors gem



I really like the experience of doing Ruby on Rails development on c9 you guys of pretty much nailed it. The only really frustrating thing I have found so far is that I’m unable to use the better_errors gem because the REMOTE_ADDR IP in the app preview is dynamic and keeps on changing. I tried white listing a range of IPs

 if ENV['C9_IP']
    for i in (1..200)
      BetterErrors::Middleware.allow_ip! "10.240.0.#{i.to_s}"

But that didn’t work. The range is white listed but better_errors still does not consider it white listed. Any ideas?


I’m not familiar with using that gem but you could have a look at the workspace IP addresses to whitelist and try adding those to your whitelist.


Does https://github.com/charliesome/better_errors/issues/318 help? It did for me.


Yes is it did help. Thanks for sharing!