mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 20:01:45 +00:00
cache GET requests only
This commit is contained in:
parent
ca2bf870d8
commit
56f86505db
1 changed files with 4 additions and 0 deletions
|
|
@ -531,6 +531,10 @@ ngx_http_upstream_cache(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
|||
ngx_int_t rc;
|
||||
ngx_http_cache_t *c;
|
||||
|
||||
if (!(r->method & NGX_HTTP_GET)) {
|
||||
return NGX_DECLINED;
|
||||
}
|
||||
|
||||
c = ngx_pcalloc(r->pool, sizeof(ngx_http_cache_t));
|
||||
if (c == NULL) {
|
||||
return NGX_ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue