Reputation: 23
I have a project that uses an Apache server that demands NTLM auth. If i look with packetracer to the http packets i can see the username in clear text.
My question is how do i read the http headers of the current connection. I have tried:
url = URI.parse('http://www.knowbase.be')
req = Net::HTTP::Get.new('http://www.knowbase.be')
@res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
}
But that gives a http request from server side. Can someone help me with this! I need this functionality for implementing this --> Tutorial
Upvotes: 2
Views: 7735
Reputation: 12809
You should probably look at the contents of request.headers
, see the documentation. Some tweaking in Apache may be necessary to get the correct header forwarded to Rails.
Upvotes: 4