Welcome! Log In Create A New Profile

Advanced

Re: Nginx LUA

Yichun Zhang (agentzh)
June 13, 2015 10:56PM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx LUA

nginxsantos June 07, 2015 10:41AM

Re: Nginx LUA

Yichun Zhang (agentzh) June 13, 2015 10:56PM

Re: Nginx LUA

ryd994 June 15, 2015 12:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready