From mdounin at mdounin.ru Tue Apr 2 18:51:24 2024 From: mdounin at mdounin.ru (Maxim Dounin) Date: Tue, 2 Apr 2024 21:51:24 +0300 Subject: freenginx-1.25.5 Message-ID: Changes with freenginx 1.25.5 02 Apr 2024 *) Change: MIME type for the "bmp" extension has been changed to "image/bmp", for the "rar" extension to "application/vnd.rar", and the "deb" and "udeb" extensions now use the "application/vnd.debian.binary-package" MIME type. Thanks to Yuriy Izorkin. *) Change: the "client_max_body_size" directive is now used to limit total size of ignored chunk extensions and trailer headers when reading a request body using chunked transfer encoding. Thanks to Bartek Nowotarski. *) Change: now at most one empty line is allowed before a request. *) Feature: logging to syslog errors are now reported at most once per second. *) Feature: the "max_commands" directive in the mail proxy module. *) Bugfix: incorrect server name might be returned in responses when using the "server_tokens off" directive. Thanks to Tatsuya Kaneko and Antanas Pata?ius. *) Bugfix: when reading a request body from a fast connection reading for a long time was possible. -- Maxim Dounin http://freenginx.org/ From kirill at korins.ky Sun Apr 7 11:36:21 2024 From: kirill at korins.ky (Kirill A. Korinsky) Date: Sun, 07 Apr 2024 13:36:21 +0200 Subject: Nginx ignores proxy_no_cache Message-ID: <87sezxpfpm.wl-kirill@korins.ky> Greetings, Let assume that I would like behavior on LB from the backend and force it to cache only resposnes that have a X-No-Cache header with value NO. Nginx should cache a response with any code, if it has such headers. This works well until the backend is unavailable and nginx returns a hardcoded 502 that doesn't have a control header, but such a response is cached anyway. Here is the config that allows to reproduce the issue: http { default_type application/octet-stream; proxy_cache_path /tmp/nginx_cache keys_zone=the_zone:1m; proxy_cache the_zone; proxy_cache_valid any 15m; proxy_cache_methods GET HEAD POST; add_header X-Cache-Status $upstream_cache_status always; map $upstream_http_x_no_cache $no_cache { default 1; "NO" 0; } proxy_no_cache $no_cache; upstream echo { server 127.127.127.127:80; } server { listen 1234; server_name localhost; location / { proxy_pass http://echo; } } } when I run: curl -D - http://127.0.0.1:1234/ it returns MISS on the first request, and HIT on the second one. Here I expect both requests to return MISS. -- wbr, Kirill From mdounin at mdounin.ru Sun Apr 7 13:56:20 2024 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 7 Apr 2024 16:56:20 +0300 Subject: Nginx ignores proxy_no_cache In-Reply-To: <87sezxpfpm.wl-kirill@korins.ky> References: <87sezxpfpm.wl-kirill@korins.ky> Message-ID: Hello! On Sun, Apr 07, 2024 at 01:36:21PM +0200, Kirill A. Korinsky wrote: > Greetings, > > Let assume that I would like behavior on LB from the backend and force it to > cache only resposnes that have a X-No-Cache header with value NO. > > Nginx should cache a response with any code, if it has such headers. > > This works well until the backend is unavailable and nginx returns a > hardcoded 502 that doesn't have a control header, but such a response is > cached anyway. > > Here is the config that allows to reproduce the issue: > > http { > default_type application/octet-stream; > > proxy_cache_path /tmp/nginx_cache keys_zone=the_zone:1m; > proxy_cache the_zone; > proxy_cache_valid any 15m; > proxy_cache_methods GET HEAD POST; > > add_header X-Cache-Status $upstream_cache_status always; > > map $upstream_http_x_no_cache $no_cache { > default 1; > "NO" 0; > } > > proxy_no_cache $no_cache; > > upstream echo { > server 127.127.127.127:80; > } > > server { > listen 1234; > server_name localhost; > > location / { > proxy_pass http://echo; > } > } > } > > when I run: > > curl -D - http://127.0.0.1:1234/ > > it returns MISS on the first request, and HIT on the second one. > > Here I expect both requests to return MISS. Thanks for the report. Indeed, proxy_no_cache is only checked for proper upstream responses, but not when caching errors, including internally generated 502/504 in ngx_http_upstream_finalize_request(), and intercepted errors in ngx_http_upstream_intercept_errors(). Quick look suggests there will be also issues with caching errors after proxy_cache_bypass (errors won't be cached even if they should), as well as issues with proxy_cache_max_range_offset after proxy_cache_bypass (it will be ignored). This needs cleanup / fixes, added to my TODO list. -- Maxim Dounin http://mdounin.ru/ From mdounin at mdounin.ru Tue Apr 9 13:30:43 2024 From: mdounin at mdounin.ru (Maxim Dounin) Date: Tue, 9 Apr 2024 16:30:43 +0300 Subject: freenginx-1.26.0 Message-ID: Changes with freenginx 1.26.0 09 Apr 2024 *) 1.26.x stable branch. -- Maxim Dounin http://freenginx.org/ From glyn.normington.work at gmail.com Sun Apr 21 02:43:05 2024 From: glyn.normington.work at gmail.com (Glyn Normington) Date: Sun, 21 Apr 2024 03:43:05 +0100 Subject: Modules Message-ID: Hi I recently wrote an NGINX module ([1]). What do I need to do, if anything, to support freenginx? Regards, Glyn [1] https://github.com/glyn/nginx_robot_access -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdounin at mdounin.ru Sun Apr 21 19:43:04 2024 From: mdounin at mdounin.ru (Maxim Dounin) Date: Sun, 21 Apr 2024 22:43:04 +0300 Subject: Modules In-Reply-To: References: Message-ID: Hello! On Sun, Apr 21, 2024 at 03:43:05AM +0100, Glyn Normington wrote: > I recently wrote an NGINX module ([1]). What do I need to do, if anything, > to support freenginx? > > Regards, > Glyn > [1] https://github.com/glyn/nginx_robot_access As of now, there aren't many API differences between F5 NGINX and freenginx, so modules should work without any modifications as long as compiled with freenginx. In the future likely there will be API changes which will require code modifications. For these you'll need to adapt your code accordingly, much like it is usually done for API changes between versions. -- Maxim Dounin http://mdounin.ru/ From glyn.normington.work at gmail.com Sun Apr 21 20:08:13 2024 From: glyn.normington.work at gmail.com (Glyn Normington) Date: Sun, 21 Apr 2024 21:08:13 +0100 Subject: Modules In-Reply-To: References: Message-ID: Thanks Maxim. That's kind of what I expected. There's a slight wrinkle in that my module uses a Rust binding to NGINX and so there would need to be a (separate?) Rust binding for freenginx. Anyway, I've logged an issue ([2]) in case anyone wants support for freenginx. Regards, Glyn [2] https://github.com/glyn/nginx_robot_access/issues/6 On Sun, 21 Apr 2024 at 20:52, Maxim Dounin wrote: > Hello! > > On Sun, Apr 21, 2024 at 03:43:05AM +0100, Glyn Normington wrote: > > > I recently wrote an NGINX module ([1]). What do I need to do, if > anything, > > to support freenginx? > > > > Regards, > > Glyn > > [1] https://github.com/glyn/nginx_robot_access > > As of now, there aren't many API differences between F5 NGINX and > freenginx, so modules should work without any modifications as > long as compiled with freenginx. > > In the future likely there will be API changes which will require > code modifications. For these you'll need to adapt your code > accordingly, much like it is usually done for API changes between > versions. > > -- > Maxim Dounin > http://mdounin.ru/ > -- > nginx mailing list > nginx at freenginx.org > https://freenginx.org/mailman/listinfo/nginx > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnakamur at gmail.com Wed Apr 24 12:44:31 2024 From: hnakamur at gmail.com (Hiroaki Nakamura) Date: Wed, 24 Apr 2024 21:44:31 +0900 Subject: Official mirror at GitHub Message-ID: Hello, Is https://github.com/freenginx the official mirror at GitHub? Thanks. -- )Hioraki Nakamura) hnakamur at gmail.com From noloader at gmail.com Wed Apr 24 13:18:21 2024 From: noloader at gmail.com (Jeffrey Walton) Date: Wed, 24 Apr 2024 09:18:21 -0400 Subject: Official mirror at GitHub In-Reply-To: References: Message-ID: On Wed, Apr 24, 2024 at 8:45?AM Hiroaki Nakamura wrote: > Hello, > > Is https://github.com/freenginx the official mirror at GitHub? > See . Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From hnakamur at gmail.com Wed Apr 24 14:41:26 2024 From: hnakamur at gmail.com (Hiroaki Nakamura) Date: Wed, 24 Apr 2024 23:41:26 +0900 Subject: Official mirror at GitHub In-Reply-To: References: Message-ID: I saw , but there is no mention of the mirror repository. I saw Maxim Dounin at https://github.com/orgs/freenginx/people but I am not sure this is the real account of him. 2024?4?24?(?) 22:27 Jeffrey Walton : > > > > On Wed, Apr 24, 2024 at 8:45?AM Hiroaki Nakamura wrote: >> >> Hello, >> >> Is https://github.com/freenginx the official mirror at GitHub? > > > See . > > Jeff > -- > nginx mailing list > nginx at freenginx.org > https://freenginx.org/mailman/listinfo/nginx From mdounin at mdounin.ru Wed Apr 24 21:57:38 2024 From: mdounin at mdounin.ru (Maxim Dounin) Date: Thu, 25 Apr 2024 00:57:38 +0300 Subject: Official mirror at GitHub In-Reply-To: References: Message-ID: Hello! On Wed, Apr 24, 2024 at 09:44:31PM +0900, Hiroaki Nakamura wrote: > Is https://github.com/freenginx the official mirror at GitHub? Yes. (It is still being tested, though seems good enough, so I'm going to link it to the site shortly.) -- Maxim Dounin http://mdounin.ru/