首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
›
NGINX
›
NGINX Trac
›
3rd Party Modules
›
Security Advisories
›
CHANGES
›
OpenResty
›
ngx_lua
›
Tengine
在线学习资源
›
NGINX 开发从入门到精通
NGINX Modules
›
ngx_echo
广告
V2EX
›
NGINX
nginx 里应该怎么判断 upstream 是否给出了 cache-control 头?
JasonH
·
2014-02-27 17:32:11 +08:00
· 3984 次点击
这是一个创建于 3722 天前的主题,其中的信息可能已经有所发展或是发生改变。
upstream
Nginx
control
1 条回复
•
1970-01-01 08:00:00 +08:00
1
Livid
MOD
2014-02-27 22:05:35 +08:00
header_filter_by_lua '
if ngx.var.upstream_http_cache_control then
ngx.header["Cache-Control"] = ngx.var.upstream_http_cache_control
else
ngx.header["Cache-Control"] = "no-store"
end
';
你可以把 else 那里换成你想干的事。
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
3893 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms ·
UTC 04:32
·
PVG 12:32
·
LAX 21:32
·
JFK 00:32
Developed with
CodeLauncher
♥ Do have faith in what you're doing.