search for: raw_host_with_port

Displaying 2 results from an estimated 2 matches for "raw_host_with_port".

2012 Feb 10
2
My Host
I need to get some absolute redirects working -- basically I set callback hooks to external services, but I want these hooks to use my configured CNAME''s. I''m trying to find a way so that my app doesn''t have to know about these CNAME''s. So I''m looking at the request in the controller to try and get the base URL where I''m running. To
2009 Jun 25
1
request.host, proxy chains and HTTP_X_FORWARDED_HOST
...Proxy 2 ----> Phusion Deployment Server. In this scenario, the request header item HTTP_X_FORWARDED_HOST contains the following: proxy1:81, proxy2 Rails extracts the host by splitting this string and getting the last item: (actionpack-2.3.2\lib\action_controller\request.rb line 271) def raw_host_with_port if forwarded = env["HTTP_X_FORWARDED_HOST"] forwarded.split(/,\s?/).last else env[''HTTP_HOST''] || "#{env[''SERVER_NAME''] || env [''SERVER_ADDR'']}:#{env[''SERVER_PORT'']}" end...