I am trying to access the headers in a filter in Sinatra. My request includes the header "HTTP_AUTH", however I cannot access it. My filter
before do halt 403 unless request['HTTP_AUTH'] == 'test' end
It works correctly with my rack test.
browser.get '/mypath', "CONTENT_TYPE" => "application/json", "HTTP_AUTH" => 'test'
But when I try from other sources, I canβt access it. If I puts request.env , I see that the token is in the request, but I canβt access it.
"HTTP_CONNECTION"=>"close", "HTTP_AUTH"=>"test", "HTTP_ACCEPT"=>"application/json",
What am I doing wrong?
source share