내가 니스 4, PHP-FPM 7, nginx를 사용 ESI의 SRC 태그 내부 URL을 읽지 않습니다 CentOS는 7니스 4 ESI : bereq.url이
내 varnish.params :
DAEMON_OPTS="-a :80 -T 127.0.0.1:6082
-f /etc/varnish/default.vcl
-S /etc/varnish/secret
-s malloc,1g
-p feature=+esi_disable_xml_check,+esi_ignore_other_elements
-p cli_buffer=16384
-p vcc_allow_inline_c=on"
내 default.vcl는 : 내가 액세스하여 트리거 VCL 코드가 그것을 말할 것을 사용할 때
if (bereq.url ~ "^.*(\/**esi**\/)+.*$") {
set beresp.do_esi = true;
set beresp.ttl = 0s;
} else {
set beresp.ttl = 3600s;
}
내 문제는 다음과 같습니다 http://localhost/lab/varnish
렌더링 :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<esi:include src="http://localhost/lab/esi/body"/>
</body>
</html>
바니쉬는 ESI 태그 안의 url src를 읽지 않으므로 빈 몸체를 렌더링합니다.
하지만 난이 코드를 사용하는 경우 :
if (bereq.url ~ "^.*(\/**lab**\/)+.*$") {
set beresp.do_esi = true;
set beresp.ttl = 0s;
} else {
set beresp.ttl = 3600s;
}
니스를 성공적으로 생산되는 ESI 태그 내부의 콘텐츠를 렌더링을 : 니스 트리거 만드는 방법 http://localhost/lab/esi/body
ESI를 조각은 기반 렌더링 ESI "src"태그에 무엇이 있는지 알고 있습니까?
Surrogate-Capability를 설정하고 Surrogate-Control로 검사를 시도했지만 나에게 적합하지 않습니다. 실마리가 없어.
나는 바니시가 클라이언트에게 서비스하기 위해 이미 캐시 된 콘텐츠를 사용하고 ESI 태그 내부의 소스에서만 콘텐츠를 제외 (백엔드 요청)하고 싶습니다. 할 수 있습니까? –