Re: nginx-clojure - documentation? very hard to find

125 views
Skip to first unread message

Yuexiang Zhang

unread,
Nov 29, 2014, 12:30:15 AM11/29/14
to scott sims, nginx-...@googlegroups.com
Hi,



I'm having a hard time finding documentation on Clojure/Nginx. Can you forward where I can find documentation. I have google search and look at several places, but I have not find a go place. I have found your github site, but still looking for something. Below is some things I would like to do:


http://nginx-clojure.github.io/   is its website.  If you can not visit it please tell me.
 
  1. in Java using your NginxJavaRingHandler implemtation iterate over everything that is pass in via the map argument. I want to see my Java class what is being pass in from Nginx.
I have added some details about request map and response object at this link http://nginx-clojure.github.io/more.html . Please check it. 
 
  1. I cannot find documentation on how to add clojure to a linix instance. Right now, I'm using your Windows that has Clojure already compiled.
If you wan't to compile on the windows x64 please check this link https://github.com/nginx-clojure/nginx-clojure/issues/40
 
  1. documentation on all nginx.clojure.XXXX classes and what they do and examples on how to use them.
Please check  the document on its website http://nginx-clojure.github.io/  . Most of time you need not use them. If you really want to use them please check the document on its website or the comments in the source files first. If you still can not know how to do with it please mail me or nginx-clojure google group.

  1. do you have a blog?

Sorry I don't have a blog. 
If I want to post something about nginx-clojure I will update the document on its website and cc to the nginx-clojure google group.
 
Thanks, any help would be appreciated


Regards
Xfeep. 

Yuexiang Zhang

unread,
Dec 2, 2014, 10:40:03 AM12/2/14
to scott sims, nginx-...@googlegroups.com
Hi,

Rewrite handler always runs before content phase and proxy_pass runs at content phase so rewrite handler can not be used to validate the headers from the upstream server.
Nginx header filter can do what you need but this feature has not been supported (see https://github.com/nginx-clojure/nginx-clojure/issues/55).
This feature will be supported in the next release v0.3.0 .


Regards.
Xfeep


On Tue, Dec 2, 2014 at 10:29 PM, scott sims <scott....@gmail.com> wrote:
Thanks for the help and information.

I have a question. It is my understanding you cannot call multiple Clojure related rewrite_handler_name directives in the same Location context. Is this correct? For example, if I wanted to validate headers from the caller and from the upstream server.

       location / {
            #set_header localtime $time_local;
            handler_type 'java';
            rewrite_handler_name 'com.src.ValidateRequest';
      
            proxy_pass http://upstream.server.com/search;
            rewrite_handler_name 'com.src.ValidateResponse';
           
        }









Reply all
Reply to author
Forward
0 new messages