My rails app is experiencing something that has me confused. A few pages in the Rails app render content from another domain using Net::HTTP.get_resonse
. So, alpha.example.com/pages/terms displays content received from www.example.com/terms.
render text: Net::HTTP.get_response("www.example.com", "/terms/").body
About 70% of the time, this works flawlessly. The other 30%, it return completely blank BUT claims "302 Found".
How could this be? If it means anything, the source website (www.example.com) is hosted on GitHub pages. Happens in both development and production.