Skip to content

Commit 6c2c567

Browse files
authored
Merge pull request #417 from FriendsOfSymfony/test-use
use std in main vcl too
2 parents 0a33d52 + fc66a69 commit 6c2c567

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

resources/config/varnish/fos_custom_ttl.vcl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import std;
11-
1210
/**
1311
* Read a custom TTL header for the time to live information, to be used
1412
* instead of s-maxage.
13+
*
14+
* This needs an `import std;` in your main VCL. If you do not already import
15+
* the standard vmod, you need to add it there.
1516
*/
1617
sub fos_custom_ttl_backend_response {
1718
if (beresp.http.X-Reverse-Proxy-TTL) {

tests/Functional/Fixtures/varnish/custom_ttl.vcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
vcl 4.0;
22

3+
import std;
4+
35
include "../../../../resources/config/varnish/fos_debug.vcl";
46
include "../../../../resources/config/varnish/fos_custom_ttl.vcl";
57

0 commit comments

Comments
 (0)