Accessing HTTP request headers in nginx module
lists at ruby-forum.com
Fri Mar 28 00:06:00 UTC 2014
Thanks for reply. However, I am still not clear how to access the
"custom" headers in module handler. Pls see my comments inline.
B.R. wrote in post #1141281:
> In nginx, you have the http_<header name> embedded variable in the core
> access HTTP headers.
I can see that variables can be accessed by http_<header name>, however
the link says "names matching the Apache Server variables", which to me
indicates that these are not "custom" headers. With reference to my
above example, how can I access my custom header "OPERATION" in module
> You can build the logic the way you want (through
> directives from the
> rewrite module
> Using all that you can redirect to specific URL or backend with whatever
> arguments you wish to do the work for you.
Again, here I am not interested in forwarding any URL to any backend
server based on header. I simply to access and possibly iterate through
list of HTTP headers in module handler where I have reference to
> It is the UNIX way of doing things to separate components in individual
> processes, so I suggest you delegate the job to a third-party one which
> will listen for incoming requests.
> I would do that this way and keep nginx as close as possible from the
> genuine version to ensure updates are straightforward.
> My 2 cents,
> *B. R.*
Posted via http://www.ruby-forum.com/.
More information about the nginx