Hi NGINX team, do we have sample script or somebody that already did the auto retrieval script of the CRL on a regular basis ? Before re-inventing the Wheel, i was wondering if something exists. My idea was to wget the file, swap the file, run nginx -t If 0 = we reload nginx if >0 = we swap back the crl file, nginx -t etc … This could be croned Alexby alweiss - Nginx Mailing List - English
Ok, got it ! Thanks much Valentin, Maxim and Dmitry for your guidance. I decided to go as the nginx sample (https://www.nginx.com/blog/batching-api-requests-nginx-plus-javascript-module/) with the resp var which is concatened with result of each subrequest : my final_status starts with 403 at init time and I add (+=) each subrequest result so with two subrequest ending in 200, we endup with fiby alweiss - Nginx Mailing List - English
My problem is that services can be one, two … ten etc … so not easy to place in the callback of the previous subrequest ...by alweiss - Nginx Mailing List - English
Thanks guys, this is a first step. I moved declaration to the top of my script : ********START SCRIPT ************* var n = 0; var final_status = 403; var servicesCodes = ['rest','oass']; var requestCount = servicesCodes.length; function authorize(req, res) { req.warn('Variables init ...'); function done(reply) { //Callback for completed subrequests ... n++;by alweiss - Nginx Mailing List - English
Here is a sample that works with Java but not with njs : function my() { resp = "Start"; console.log ('Initial resp is ' + resp); function done() { resp += "AndContinue"; console.log('In loop resp is ' + resp) } done(); } resp = 'empty' my(); console.log('End Resp is : ' + resp) With java : root@linux3:/etc/nginx# js tby alweiss - Nginx Mailing List - English
Hi Dmitry, thanks for your reply. Here is my code called using js_content authorize; from a location {} I want to say "if at least one subrequest answers HTTP/200, set the final_status to 200 and at then end, return 200" First thing is that i must declare requestCount with var. If i don't, i get a "requestCount" is not defined I thought in javascript, you could declareby alweiss - Nginx Mailing List - English
Hi team !, Regarding the sample here : https://www.nginx.com/blog/batching-api-requests-nginx-plus-javascript-module/ I have an issue trying to use JS module : variable hoisting and global/local scope doesn't behave as expected. When i try to reassign the resp variable (as you do after declaring it), the value assigned in the done function is not brought outside of the done function to the bacby alweiss - Nginx Mailing List - English
Hi, I'm trying to use the map directive to rewrite the URL arg of my request to force https instead of http. Example : Request is : "GET https://www.mywebsite.com/?url=http://www.mysecondwebsite.com" In this example, i'm trying to rewrite the http in the URL arg with https to obtain "GET https://www.mywebsite.com/?url=httpS://www.mysecondwebsite.com" Using this confiby alweiss - How to...
Hi Lukas, I plan to use a key file on a tempfs on all my servers because we want to comply with RFC5077. Each time i change the key file with a new key, is it necessary to run a "systemctl reload nginx" ? or do Something else. If reload is not necessary, would working with 3 files always called the same would be enough if i update the content with the new key ? Like move remove file3by alweiss - Nginx Mailing List - English
Understood. Thanks much for your quick reply ! Alexby alweiss - Nginx Mailing List - English
Hi Maxim For specific needs, if i don't add the ssl_crl directive to my ssl configuration, would nginx just don't check anything or would it issue a live query on the url indicated as a crl distribution point in the client certificate, introducing high latency ...? In other words, how to completely disable.crl checking on client authentication ? Thanks !by alweiss - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |