mod_header如何实现给静态文件配置不同的过期时间 #956
-
hi, 您好, location ~* .(jpg|jpeg|gif|ico)$ { 上面是nginx的配置,请问怎么用bfe的mod_header模块代替。 谢谢 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use header "Cache-Control" with "max-age=xxx" to control cache , please refer mod_header's config ( conditions primitive req_path_suffix_in() can be used to filter resource, just like .(jpg|jpeg|gif|ico) in your example.(https://github.com/bfenetworks/bfe/blob/develop/docs/zh_cn/condition/request/uri.md) |
Beta Was this translation helpful? Give feedback.
You can use header "Cache-Control" with "max-age=xxx" to control cache , please refer mod_header's config (
https://github.com/bfenetworks/bfe/blob/develop/docs/zh_cn/modules/mod_header/mod_header.md) about how to set header in response.
conditions primitive req_path_suffix_in() can be used to filter resource, just like .(jpg|jpeg|gif|ico) in your example.(https://github.com/bfenetworks/bfe/blob/develop/docs/zh_cn/condition/request/uri.md)