# Search headers\_in

**URL:** <https://www.ruby-forum.com/t/search-headers-in/211789>\
**Category:** NGINX\
**Created:** [September 13, 2011, 6:02pm UTC](https://www.ruby-forum.com/t/search-headers-in/211789 "2011-09-13T18:02:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 13, 2011, 6:02pm UTC](https://www.ruby-forum.com/t/search-headers-in/211789/1 "2011-09-13T18:02:25Z")

</div>

I am starting to write a new module that uses a header token. I have  
searched google for the answer about "how to seach in headers for a  
name. I want to search for “X-session-token”. I am surprised that  
there is not a library function that just does the search,

As I understand it now every module that wants to search for a header  
writes it own search function?  
Is there a “library search function”?

once I have the session token I use memcached in the PREACCESS phase to  
load the session info, then in the ACCESS phase check the access  
permission.
