I’m working on a large legacy Rails 3 project, in the
ApplicationController there is a list of safe hosts and we have a method to see if the
request.host is in that list. Locally I can call
request.host and I get
localhost back. However; in production, on Sentry there are some 200,000 errors:
undefined method 'host=' for #<ActionDispatch::Request:0x007ff28f2833e8>.
I’m a little confused as to why this works locally but is apparently causing problems in production.