Re: Nginscript

2018-11-28 Thread Dmitry Volyntsev
On 28.11.2018 3:21, chadhasumit13 wrote: Hi, I intend to generate a unique id (by making use of npm uuid ) and make an external call to an HTTP end-point, whenever a new call is received by NGINX. Is it possible to use nginscript for this purpose? If yes, could you please route me to a good

Nginscript

2018-11-27 Thread chadhasumit13
Hi, I intend to generate a unique id (by making use of npm uuid ) and make an external call to an HTTP end-point, whenever a new call is received by NGINX. Is it possible to use nginscript for this purpose? If yes, could you please route me to a good example by means of which I can fulfil the

Re: nginScript question

2018-04-18 Thread Dmitry Volyntsev
On 17.04.2018 21:30, djcza...@gmail.com wrote: Is there a roadmap for nginScript There is. The short term preliminary plan is: - stream integration refactoring to match the way it done in http - access to shared memory storage - base64 encode

Re: nginScript question

2018-04-17 Thread Artem S. Povalyukhin
Hi! On 04/17/2018 09:30 PM, djcza...@gmail.com wrote: > Is there a roadmap for nginScript and any plans to make it a part of the > official nginx release? It is the official part. $ apt show nginx-module-njs Package: nginx-module-njs Version: 1.13.12.0.2.0-1~xenial Priority: optional S

Re: nginScript question

2018-04-17 Thread djczaski
Is there a roadmap for nginScript and any plans to make it a part of the official nginx release? > On Apr 10, 2018, at 8:45 AM, Dmitry Volyntsev wrote: > > > >> On 13.07.2017 18:14, aledbf wrote: >> Thanks! > > Hi, > > I am glad to inform you that sinc

Re: nginScript question

2018-04-10 Thread Dmitry Volyntsev
On 13.07.2017 18:14, aledbf wrote: Thanks! Hi, I am glad to inform you that since njs-0.2.0 it is possible to create arbitrary http subrequests from js_content phase. Here you can find the subrequest API description: http://hg.nginx.org/njs/rev/750f7c6f071c Here you can find some usage

Re: nginScript send POST resquest

2018-02-26 Thread Roman Arutyunyan
nginx.org/read.php?2,275459,275459#msg-275459 answer that this > is not possible. Exactly. It's not possible. This page describes current state of njs: http://nginx.org/en/docs/njs_about.html > Can it help if NodeJS is installed, or nginScript it completely independent? > (I d

nginScript send POST resquest

2018-02-24 Thread matke
if NodeJS is installed, or nginScript it completely independent? (I don't have much experience in any javascript stuff) This is how my script looks: [code] function baz(req, res) { res.headers.foo = 1234; res.status = 200; res.contentType = "text/plain; cha

Re: Where can I find nginScript shell

2018-01-09 Thread Dmitry Volyntsev
On 07.01.2018 17:06, kimown wrote: I find the associated code, thanks for your help, but I'm not familiar with how to building the nginScript shell, I think it's better add instruction in README.Also, nginScript is really really awesome. It is available as a part of nginx officia

Re: Where can I find nginScript shell

2018-01-07 Thread kimown
I find the associated code, thanks for your help, but I'm not familiar with how to building the nginScript shell, I think it's better add instruction in README.Also, nginScript is really really awesome. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278033,278035#

Re: Where can I find nginScript shell

2018-01-06 Thread Maxim Konovalov
Hello, On 06/01/2018 11:52, kimown wrote: > $ njs > interactive njscript > > v. -> the properties and prototype methods of v. > type console.help() for more information > > >>> var my_data = '{"colors":[{"name":"red","fancy":"brick dust"}, > {"name":"blue","fancy":"sea spray"}]}'; >>> var my_ob

Where can I find nginScript shell

2018-01-06 Thread kimown
$ njs interactive njscript v. -> the properties and prototype methods of v. type console.help() for more information >> var my_data = '{"colors":[{"name":"red","fancy":"brick dust"}, {"name":"blue","fancy":"sea spray"}]}'; >> var my_object = JSON.parse(my_data); >> my_object.colors[1].fancy; sea

Re: Inconsistent variable caching (in SSI or in nginScript)

2017-10-10 Thread Maxim Dounin
Hello! On Tue, Oct 10, 2017 at 10:22:50AM -0400, Anton Yuzhaninov wrote: > On 10/09/17 22:15, Anton Yuzhaninov wrote: > > > > I've encountered a bug (or unexpected and not well documented feature) > > in SSI (ngx_http_ssi_module) or in nginScript (ngx_http_js_modul

Re: Inconsistent variable caching (in SSI or in nginScript)

2017-10-10 Thread Anton Yuzhaninov
On 10/09/17 22:15, Anton Yuzhaninov wrote: > > I've encountered a bug (or unexpected and not well documented feature) > in SSI (ngx_http_ssi_module) or in nginScript (ngx_http_js_module). > > If a variable, which set via js_set is used only in SSI it is not cached >

Inconsistent variable caching (in SSI or in nginScript)

2017-10-09 Thread Anton Yuzhaninov
Hello, I've encountered a bug (or unexpected and not well documented feature) in SSI (ngx_http_ssi_module) or in nginScript (ngx_http_js_module). If a variable, which set via js_set is used only in SSI it is not cached and nginScript function called several times for one HTTP request. I

nginscript subrequests or way to save vars between requests

2017-08-02 Thread mattw
In most of the docs for nginscript it talks about how it will not block on subrequests. But I havent seen any examples on how to perform these subrequests. Is there a way to do this? Or any way to save a variable somewhere (over the net, in a file, in memory) between requests? Or are my scripts

Re: nginScript question

2017-07-13 Thread aledbf
Thanks! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275459,275477#msg-275477 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: nginScript question

2017-07-13 Thread Dmitry Volyntsev
On 12.07.2017 23:57, aledbf wrote: Hi, It is possible to make a HTTP request with nginScript? Hi, Unfortunately, this is not possible so far. But, we are going to add such functionality in the future. You can find what is currently possible here http://nginx.org/en/docs/http

nginScript question

2017-07-12 Thread aledbf
Hi, It is possible to make a HTTP request with nginScript? I am trying to avoid adding the lua module just for this Thanks in advance Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275459,275459#msg-275459 ___ nginx mailing list nginx

nginScript filesystem access

2017-04-13 Thread Unsay
Hello We'd like to move a rather complicated multilingual website over to nginx. I must determine if we can handle the somewhat involved language based redirects in nginScript middleware (javascript). At one point I must redirect based on whether or not a file exists. In the configuration f

Re: nginScript and accessing cookies

2017-04-13 Thread Unsay
Okay, I've found the answer to my question. nginScript supports access to all of NGINX's variables. This also provides access to the cookie like so: myfunction(req, res) { var cookie = req.variables.http_cookie; } Kind regards Andreas Posted at Nginx Forum: https://forum.nginx.or

Re: nginScript and accessing cookies

2017-04-09 Thread Jeff Dyke
at first glance i thought this may be dead, but perhaps you'd should look here: https://www.nginx.com/blog/introduction-nginscript/, which supports both Plus and OSS versions. I've been working with the lua module via nginx-extras on ubuntu, they suit my needs, but that page may help

nginScript and accessing cookies

2017-04-09 Thread Unsay Mono via nginx
Hey everyone In this nginx news article the author states: > With nginScript you can route traffic based on any data in the request, > including cookies, headers, arguments, or any keywords in the request body. So far I've been unable to find any documentation on how to read and write

nginx 1.11.12 + nginScript = failed to restart nginx server

2017-03-25 Thread George
Nginx compiles successfully with nginScript as a dynamic module. nginx -V nginx version: nginx/1.11.12 built by clang 3.4.2 (tags/RELEASE_34/dot2-final) built with LibreSSL 2.4.5 TLS SNI support enabled configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/loca

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-14 Thread George
Hi Igor thanks for the clarification. Looking forward to updated examples/wiki for nginScript :) Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269548,269559#msg-269559 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread Igor Sysoev
On 14 Sep 2016, at 05:35, George wrote: > and examples in wiki for nginxScript for js_run > https://www.nginx.com/resources/wiki/nginScript/#section-1-overview The examples are obsolete, we will update them soon. -- Igor Sysoev http://ngi

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread Igor Sysoev
On 14 Sep 2016, at 05:32, George wrote: > even > > > location /njs { >js_run " >var res; >res = $r.response; >res.status = 200; >res.send('Hello World!'); >res.finish(); >"; > } > > gives an error > > nginx -t > nginx: [emerg] unknown directive

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread George
and examples in wiki for nginxScript for js_run https://www.nginx.com/resources/wiki/nginScript/#section-1-overview Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269548,269552#msg-269552 ___ nginx mailing list nginx@nginx.org http

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread George
even location /njs { js_run " var res; res = $r.response; res.status = 200; res.send('Hello World!'); res.finish(); "; } gives an error nginx -t nginx: [emerg] unknown directive "js_run" in /usr/local/nginx/conf/conf.d/virtual.conf:36 nginx: conf

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread George
sorry i meant from old example readme at http://hg.nginx.org/njs/file/11d4d66851ed/README Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269548,269550#msg-269550 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinf

Re: nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread Valentin V. Bartenev
On Tuesday 13 September 2016 22:14:32 George wrote: > Tried compiling nginScript with nginx 1.11.4 as a dynamic module and the > README github example at https://github.com/nginx/njs/blob/master/README > gives me js_run unknown directive so looks like maybe didn't insta

nginScript + nginx 1.11.4, js_run unknown directive ?

2016-09-13 Thread George
Tried compiling nginScript with nginx 1.11.4 as a dynamic module and the README github example at https://github.com/nginx/njs/blob/master/README gives me js_run unknown directive so looks like maybe didn't install correctly ? CentOS 7.2 64bit nginx -V nginx version: nginx/1.11.4 built b

Re: nginScript (njs) feedback

2016-06-24 Thread Jorge L.
​Thanks for your reply. It sounds great! ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: nginScript (njs) feedback

2016-06-24 Thread Igor Sysoev
imited by 4K. We are going to support js in files. > On Wed, Jun 22, 2016 at 8:35 PM, Jorge L. wrote: > I'm trying to implement a routing logic with nginScript. I haven't been > successful because I miss important javascript feature. > > I would like to give you m

Re: nginScript (njs) feedback

2016-06-23 Thread Jorge L.
ny solution for this problem? On Wed, Jun 22, 2016 at 8:35 PM, Jorge L. wrote: > I'm trying to implement a routing logic with nginScript. I haven't been > successful because I miss important javascript feature. > > I would like to give you my feedback just in cas

nginScript (njs) feedback

2016-06-22 Thread Jorge L.
I'm trying to implement a routing logic with nginScript. I haven't been successful because I miss important javascript feature. I would like to give you my feedback just in case it may help to improve njs (from more important/blocking to less important): - There is no way to itera

Re: nginScript - is it fuzzed?

2015-09-28 Thread Jacek Wielemborek
W dniu 28.09.2015 o 17:26, Alt pisze: > Hello, > > Markus Linnala has found at least two bugs with afl-fuzz: > http://forum.nginx.org/read.php?29,261583 > http://forum.nginx.org/read.php?29,261582 > > nginScript is very new, I'm sure you can help to test it if you

Re: nginScript - is it fuzzed?

2015-09-28 Thread Alt
Hello, Markus Linnala has found at least two bugs with afl-fuzz: http://forum.nginx.org/read.php?29,261583 http://forum.nginx.org/read.php?29,261582 nginScript is very new, I'm sure you can help to test it if you know how to use afl-fuzz. Best Regards, Olivier Posted at Nginx Forum:

Re: nginScript - is it fuzzed?

2015-09-28 Thread Jacek Wielemborek
W dniu 28.09.2015 o 16:29, Jacek Wielemborek pisze: > [1] https://lolware.net/2015/04/28/nginx-fuzzing.html Oh crap, sorry, actually I misread the article and it looks like nothing was found. Still, running the new language through a fuzzer sounsd worthwhile - if anyone is interested in this task,

nginScript - is it fuzzed?

2015-09-28 Thread Jacek Wielemborek
Hello, I just read this blog post: https://www.nginx.com/blog/launching-nginscript-and-looking-ahead Given that afl-fuzz was already successful in finding security bugs in Nginx [1], I figured I'd ask whether nginScript was or is planned to be fuzzed as well. Quick Google search didn&#