Welcome! Log In Create A New Profile

Advanced

Re: Setting or clearing request->args

September 22, 2009 10:11AM
Dear Igor,

I think you misunderstand me. Not the log output is the problem if I want to use eg. proxy_cache than I need to remove the query parameters before caching the content.

The request flow should be (so the origin server wont get any query parameters):
GET /uri?params HTTP/1.x -> nginx -> GET /uri HTTP/1.x -> origin server

More on this, is it possible to modify the request flow programmatically without internal_redirect? Like:
GET /uri?param1=value1&param2=value2 HTTP/1.x -> nginx -> GET /uri?my_param=value3 HTTP/1.x -> origin server

My temporary workaround:
location / {
root /emptydir
leki_test on;
error_page 404 = /FETCH$uri;
}
location /FETCH/ {
internal;
proxy_pass http://test/;
proxy_cache test;
proxy_cache_min_uses 1;
proxy_cache_valid 1d;
proxy_cache_methods GET HEAD;
proxy_cache_use_stale error timeout;
}

But a better solution would be like this, which does not work at the moment:
location / {
leki_test on;
proxy_pass http://test;
proxy_cache test;
proxy_cache_min_uses 1;
proxy_cache_valid 1d;
proxy_cache_methods GET HEAD;
proxy_cache_use_stale error timeout;
}

Regards,
Gabor Lekeny
Subject Author Posted

Setting or clearing request->args

leki75 September 22, 2009 04:21AM

Re: Setting or clearing request->args

leki75 September 22, 2009 04:28AM

Re: Setting or clearing request->args

Igor Sysoev September 22, 2009 05:52AM

Re: Setting or clearing request->args

leki75 September 22, 2009 08:25AM

Re: Setting or clearing request->args

Igor Sysoev September 22, 2009 09:22AM

Re: Setting or clearing request->args

leki75 September 22, 2009 10:11AM

Re: Setting or clearing request->args

Maxim Dounin September 22, 2009 10:22AM

Re: Setting or clearing request->args

leki75 September 22, 2009 11:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 324
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready