Nginx LUA

Yichun Zhang (agentzh) agentzh at gmail.com
Sun Jun 14 02:54:39 UTC 2015


Hello!

On Sun, Jun 7, 2015 at 10:41 PM, nginxsantos wrote:
> Can anyone please help me with a lua configuration which I can embedded into
> nginx.conf to send the following sepaately in access log.
>
> user_agent_os
> user_agent_browser
> user_agent_version
>
> At present all these fields are embedded in http_user_agent and I am writing
> parser to parse at the receiver end. I am looking for some input where I can
> send them separately as different fields from Nginx itself.
>

You need to parse the User-Agent header value yourself in Lua with
regexes or something. Not sure if there's a ready-to-use 3rd-party Lua
libraries that can already parse that for you.

BTW, you're recommended to post ngx_lua related questions to the
openresty-en mailing list instead. Please see
https://openresty.org/#Community for more details. Thanks.

Best regards,
-agentzh



More information about the nginx mailing list