Accessing HTTP request headers in nginx module

B.R. reallfqq-nginx at yahoo.fr
Thu Mar 27 23:16:42 UTC 2014


In nginx, you have the http_<header name> embedded variable in the core
module <http://nginx.org/en/docs/http/ngx_http_core_module.html#variables>to
access HTTP headers.
You can build the logic the way you want (through
map<http://nginx.org/en/docs/http/ngx_http_map_module.html>or
directives from the
rewrite module <http://nginx.org/en/docs/http/ngx_http_rewrite_module.html>
).

Using all that you can redirect to specific URL or backend with whatever
arguments you wish to do the work for you.

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 lean
genuine version to ensure updates are straightforward.

My 2 cents,
---
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140328/52b0e9a5/attachment.html>


More information about the nginx mailing list