Passing variables from nginx to sinatra

I am trying to pass a uID($uid_got value) that has been generated
by Nginx httpuseridmodule to my sinatra app.

Basically I could have taken from the cookie but the cookie does not get
set on the browser unless the response headers have been sent back.

Can anyone give any suggestions regarding that?


ok never mind I figured out my self. Just in case if anyone wants to
know here is how I did it.

passenger_set_cgi_param Variable Value