skarayan
2010-Jul-23 09:37 UTC
How to get remote hostname from behind mongrel cluster in rails?
Using request.env[''REMOTE_HOST''] worked with WEBrick, but returns blank when running behind mongrel cluster. For IP Address, I am able to use request.remote_ip. Thank you. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
David Kahn
2010-Jul-23 14:55 UTC
Re: How to get remote hostname from behind mongrel cluster in rails?
I haven''t done this specifically, but I think you would need to specifically forward certain header(s) from your front end proxy --- maybe something like X-Forwarded-*Server.* On Fri, Jul 23, 2010 at 5:37 AM, skarayan <skarayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Using request.env[''REMOTE_HOST''] worked with WEBrick, but returns > blank when running behind mongrel cluster. > For IP Address, I am able to use request.remote_ip. > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
skarayan
2010-Jul-24 17:46 UTC
Re: How to get remote hostname from behind mongrel cluster in rails?
Thanks. Does anyone know how I can do this? On Jul 23, 10:55 am, David Kahn <d...-rfEMNHKVqOwNic7Bib+Ti1W1rNmOCjRP@public.gmane.org> wrote:> I haven''t done this specifically, but I think you would need to specifically > forward certain header(s) from your front end proxy --- maybe something like > X-Forwarded-*Server.* > > > > On Fri, Jul 23, 2010 at 5:37 AM, skarayan <skara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Using request.env[''REMOTE_HOST''] worked with WEBrick, but returns > > blank when running behind mongrel cluster. > > For IP Address, I am able to use request.remote_ip. > > Thank you. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscrib e@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Maybe Matching Threads
- Need clarification on mongrel, rails, threads, and performance
- Rails 3 Active Record query returns "undefined method `loaded?' for #<Array:0x126a4c>"
- Did rails or shoulda go insane on the inflection of 'taxes'?
- Date parse - month and day reversed
- requests hanging