Welcome! Log In Create A New Profile

Advanced

using return (http_rewrite) with etag

Posted by rsckp 
rsckp
using return (http_rewrite) with etag
May 04, 2018 04:10PM
Hi guys,

In my configuration I'm using return directive from http_rewrite module. I'd
also like to enable etag to speed things up. Sadly, so far didn't manage to
get it to work. Is such configuration even possible?

If I hash out "return...", etag works like a charm.

server {
listen 80 default_server;
root /var/www/html;
index index.nginx-debian.html;

default_type application/json;
etag on;
return 200 'xxx';
}

Debian 9.4, nginx-light 1.10.3-1+deb9u1.

Thanks in advance for any thoughts.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279680,279680#msg-279680

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: using return (http_rewrite) with etag
May 04, 2018 04:20PM
Hello!

On Fri, May 04, 2018 at 10:04:02AM -0400, rsckp wrote:

> Hi guys,
>
> In my configuration I'm using return directive from http_rewrite module. I'd
> also like to enable etag to speed things up. Sadly, so far didn't manage to
> get it to work. Is such configuration even possible?
>
> If I hash out "return...", etag works like a charm.
>
> server {
> listen 80 default_server;
> root /var/www/html;
> index index.nginx-debian.html;
>
> default_type application/json;
> etag on;
> return 200 'xxx';
> }
>
> Debian 9.4, nginx-light 1.10.3-1+deb9u1.
>
> Thanks in advance for any thoughts.

The "etag" directive controls whether entity tags will be
generated for static files. Entity tags (as well as Last-Modified
headers) are never generated for responses produced with the "return"
directive.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
rsckp
Re: using return (http_rewrite) with etag
May 07, 2018 08:40AM
That would explain it. Thank you for the information!

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279680,279692#msg-279692

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login