2

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

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

You are my hero! Was looking for this a long time
Well in my own time, I had been looking for this long time as well... Until I though "well it'd make sense for it to be in something like request.headers"... I tried it, and I was like "oh right..." :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.