文件操作 - vcl-example-manipulating-headers.rst.txt
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/varnish/html/_sources/users-guide/vcl-example-manipulating-headers.rst.txt
编辑文件内容
.. Copyright (c) 2013-2015 Varnish Software AS SPDX-License-Identifier: BSD-2-Clause See LICENSE file for full text of license Manipulating request headers in VCL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lets say we want to remove the cookie for all objects in the `/images` directory of our web server:: sub vcl_recv { if (req.url ~ "^/images") { unset req.http.cookie; } } Now, when the request is handled to the backend server there will be no cookie header. The interesting line is the one with the if-statement. It matches the URL, taken from the request object, and matches it against the regular expression. Note the match operator. If it matches the Cookie: header of the request is unset (deleted).
修改文件时间
将文件时间修改为当前时间的前一年
删除文件