0

我有以下 VCL:

sub jamie_fetch
{
    if(beresp.http.X-Var-Cache == "YES") {
        unset beresp.http.Set-Cookie;
        set beresp.http.X-Cacheable = "YES";
        set beresp.grace = 365d;
        set beresp.ttl = 365d;

        return(deliver);
    }

    set beresp.http.X-Cacheable = "NO";

    return(hit_for_pass);
}

我知道它部分有效,因为我在第一次访问该页面时得到以下标题:

X-Cacheable:YES

但是我也得到:

Set-Cookie:foobar

我假设我在以下方面犯了错误:

unset beresp.http.Set-Cookie;

但从我的搜索来看,这似乎是正确的?如果有更多经验的人能指出我正确的方向,我将不胜感激。

提前感谢任何帮助/提示/指针:-)

4

1 回答 1

1

使用时应使用小写标题名称unset

unset beresp.http.set-cookie;
于 2012-03-11T00:46:54.977 回答