We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ "id": "test-1107-weather-3", "uri": "/api/test/weather/cache2disk", "plugins": { "proxy-rewrite": { "uri": "/api/tianqi/tqyb.php" }, "proxy-cache": { "cache_strategy": "disk", "cache_zone": "disk_cache_default", "cache_key": ["$http_token", "$request_uri", "$request_body", "-cache-id"], "cache_ttl": 60, "cache_method": ["GET", "POST"], "cache_http_status": [200] } }, "methods": ["GET"], "priority": 10, "upstream": { "type": "roundrobin", "nodes": { "cn.xxx.cn:443": 1 }, "scheme": "https" } }
定义cache_key时,无法通过$http_token获取请求头中的token值,实际调用时token传入不同的值都会命中缓存。
cache_key
$http_token
想问下cache_key如何获取自定义请求头?
apisix version
uname -a
openresty -V
nginx -V
curl http://127.0.0.1:9090/v1/server_info
luarocks --version
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
定义
cache_key
时,无法通过$http_token
获取请求头中的token值,实际调用时token传入不同的值都会命中缓存。想问下
cache_key
如何获取自定义请求头?Environment
apisix version
): 3.11.0uname -a
): Linux rancher0 3.10.0-693.el7.x86_64openresty -V
ornginx -V
): openresty/1.25.3.2curl http://127.0.0.1:9090/v1/server_info
): 3.5.16luarocks --version
):The text was updated successfully, but these errors were encountered: