Getting CSV file values as nginx variable

Hi,

I need to get values of CSV files in my project:
John Malkovich,Person,123 Mulholland Drive,…
to have in config something like:
csv_path /path/to/csv/dir;
csv_key $arg_id;

uwsgi_param USER_NAME $csv_1;

what’s the best way for it?

I’ve checked Array Var module by agentzh
( https://github.com/agentzh/array-var-nginx-module )
looks like it realizes similar task.
May be I’m looking in wrong direction and answer closer?

On Fri, Jun 3, 2011 at 5:29 AM, Roman V.
[email protected] wrote:

what’s the best way for it?

Code up some Lua in the rewrite_by_lua directive provided by ngx_lua?

I’ve checked Array Var module by agentzh
( https://github.com/agentzh/array-var-nginx-module )
looks like it realizes similar task.
May be I’m looking in wrong direction and answer closer?

No, you’re looking in a wrong direction, unfortunately :slight_smile:

Regards,
-agentzh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs