Skip to content

Commit c7eafb7

Browse files
authored
IBX-10312: Rebranded VCL files (#64)
1 parent e2dfc95 commit c7eafb7

File tree

4 files changed

+35
-35
lines changed

4 files changed

+35
-35
lines changed

docs/varnish/vcl/parameters.vcl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
// Replace the host to fit your setup
33
//
44
// For additional example see:
5-
// https://github.com/ezsystems/ezplatform/blob/master/doc/docker/entrypoint/varnish/parameters.vcl
5+
// https://github.com/ibexa/docker/blob/main/docker/entrypoint/varnish/parameters.vcl
66

7-
backend ezplatform {
7+
backend ibexa {
88
.host = "127.0.0.1"; // Replace with hostname/ip of the application server
99
.port = "80";
1010
}
1111

1212
// ACL for invalidators IP
1313
//
1414
// Alternative using HTTPCACHE_VARNISH_INVALIDATE_TOKEN : VCL code also allows for token based invalidation, to use it define a
15-
// shared secret using env variable HTTPCACHE_VARNISH_INVALIDATE_TOKEN and eZ Platform will also use that for configuring this
16-
// bundle. This is prefered for setups such as platform.sh/eZ Platform Cloud, where circular service dependency is
15+
// shared secret using env variable HTTPCACHE_VARNISH_INVALIDATE_TOKEN and Ibexa DXP will also use that for configuring this
16+
// bundle. This is prefered for setups such as Ibexa Cloud, where circular service dependency is
1717
// unwanted. If you use this, use a strong cryptological secure hash & make sure to keep the token secret.
18-
// Use ez_purge_acl for invalidation by token.
18+
// Use ibexa_purge_acl for invalidation by token.
1919
acl invalidators {
2020
"127.0.0.1";
2121
"192.168.0.0"/16;

docs/varnish/vcl/varnish5.vcl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include "parameters.vcl";
1818
sub vcl_recv {
1919

2020
// Set the backend
21-
set req.backend_hint = ezplatform;
21+
set req.backend_hint = ibexa;
2222

2323
// Add a Surrogate-Capability header to announce ESI support.
2424
set req.http.Surrogate-Capability = "abc=ESI/1.0";
@@ -31,7 +31,7 @@ sub vcl_recv {
3131
}
3232

3333
// Trigger cache purge if needed
34-
call ez_purge;
34+
call ibexa_purge;
3535

3636
// Don't cache requests other than GET and HEAD.
3737
if (req.method != "GET" && req.method != "HEAD") {
@@ -72,7 +72,7 @@ sub vcl_recv {
7272
set req.url = std.querysort(req.url);
7373

7474
// Retrieve client user context hash and add it to the forwarded request.
75-
call ez_user_context_hash;
75+
call ibexa_user_context_hash;
7676

7777
// If it passes all these tests, do a lookup anyway.
7878
return (hash);
@@ -142,13 +142,13 @@ sub vcl_backend_response {
142142
// Handle purge
143143
// You may add FOSHttpCacheBundle tagging rules
144144
// See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4
145-
sub ez_purge {
145+
sub ibexa_purge {
146146
// Retrieve purge token, needs to be here due to restart, match for PURGE method done within
147-
call ez_invalidate_token;
147+
call ibexa_invalidate_token;
148148

149149
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl
150150
if (req.method == "PURGEKEYS") {
151-
call ez_purge_acl;
151+
call ibexa_purge_acl;
152152

153153
# If neither of the headers are provided we return 400 to simplify detecting wrong configuration
154154
if (!req.http.xkey-purge && !req.http.xkey-softpurge) {
@@ -171,13 +171,13 @@ sub ez_purge {
171171

172172
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl
173173
if (req.method == "PURGE") {
174-
call ez_purge_acl;
174+
call ibexa_purge_acl;
175175

176176
return (purge);
177177
}
178178
}
179179

180-
sub ez_purge_acl {
180+
sub ibexa_purge_acl {
181181
if (req.http.x-invalidate-token) {
182182
if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) {
183183
return (synth(405, "Method not allowed"));
@@ -188,7 +188,7 @@ sub ez_purge_acl {
188188
}
189189

190190
// Sub-routine to get client user context hash, used to for being able to vary page cache on user rights.
191-
sub ez_user_context_hash {
191+
sub ibexa_user_context_hash {
192192

193193
// Prevent tampering attacks on the hash mechanism
194194
if (req.restarts == 0
@@ -237,7 +237,7 @@ sub ez_user_context_hash {
237237
}
238238

239239
// Sub-routine to get invalidate token.
240-
sub ez_invalidate_token {
240+
sub ibexa_invalidate_token {
241241
// Prevent tampering attacks on the token mechanisms
242242
if (req.restarts == 0
243243
&& (req.http.accept ~ "application/vnd.ezplatform.invalidate-token"

docs/varnish/vcl/varnish6.vcl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ include "parameters.vcl";
1818
sub vcl_recv {
1919

2020
// Set the backend
21-
set req.backend_hint = ezplatform;
21+
set req.backend_hint = ibexa;
2222

2323
// Add a Surrogate-Capability header to announce ESI support.
2424
set req.http.Surrogate-Capability = "abc=ESI/1.0";
@@ -31,7 +31,7 @@ sub vcl_recv {
3131
}
3232

3333
// Trigger cache purge if needed
34-
call ez_purge;
34+
call ibexa_purge;
3535

3636
// Don't cache requests other than GET and HEAD.
3737
if (req.method != "GET" && req.method != "HEAD") {
@@ -72,7 +72,7 @@ sub vcl_recv {
7272
set req.url = std.querysort(req.url);
7373

7474
// Retrieve client user context hash and add it to the forwarded request.
75-
call ez_user_context_hash;
75+
call ibexa_user_context_hash;
7676

7777
// If it passes all these tests, do a lookup anyway.
7878
return (hash);
@@ -142,13 +142,13 @@ sub vcl_backend_response {
142142
// Handle purge
143143
// You may add FOSHttpCacheBundle tagging rules
144144
// See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4
145-
sub ez_purge {
145+
sub ibexa_purge {
146146
// Retrieve purge token, needs to be here due to restart, match for PURGE method done within
147-
call ez_invalidate_token;
147+
call ibexa_invalidate_token;
148148

149149
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl
150150
if (req.method == "PURGEKEYS") {
151-
call ez_purge_acl;
151+
call ibexa_purge_acl;
152152

153153
# If neither of the headers are provided we return 400 to simplify detecting wrong configuration
154154
if (!req.http.xkey-purge && !req.http.xkey-softpurge) {
@@ -171,13 +171,13 @@ sub ez_purge {
171171

172172
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl
173173
if (req.method == "PURGE") {
174-
call ez_purge_acl;
174+
call ibexa_purge_acl;
175175

176176
return (purge);
177177
}
178178
}
179179

180-
sub ez_purge_acl {
180+
sub ibexa_purge_acl {
181181
if (req.http.x-invalidate-token) {
182182
if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) {
183183
return (synth(405, "Method not allowed"));
@@ -188,7 +188,7 @@ sub ez_purge_acl {
188188
}
189189

190190
// Sub-routine to get client user context hash, used to for being able to vary page cache on user rights.
191-
sub ez_user_context_hash {
191+
sub ibexa_user_context_hash {
192192

193193
// Prevent tampering attacks on the hash mechanism
194194
if (req.restarts == 0
@@ -237,7 +237,7 @@ sub ez_user_context_hash {
237237
}
238238

239239
// Sub-routine to get invalidate token.
240-
sub ez_invalidate_token {
240+
sub ibexa_invalidate_token {
241241
// Prevent tampering attacks on the token mechanisms
242242
if (req.restarts == 0
243243
&& (req.http.accept ~ "application/vnd.ezplatform.invalidate-token"

docs/varnish/vcl/varnish7.vcl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include "/etc/varnish/parameters.vcl";
1616
sub vcl_recv {
1717

1818
// Set the backend
19-
set req.backend_hint = ezplatform;
19+
set req.backend_hint = ibexa;
2020

2121
// Add a Surrogate-Capability header to announce ESI support.
2222
set req.http.Surrogate-Capability = "abc=ESI/1.0";
@@ -29,7 +29,7 @@ sub vcl_recv {
2929
}
3030

3131
// Trigger cache purge if needed
32-
call ez_purge;
32+
call ibexa_purge;
3333

3434
// Don't cache requests other than GET and HEAD.
3535
if (req.method != "GET" && req.method != "HEAD") {
@@ -70,7 +70,7 @@ sub vcl_recv {
7070
set req.url = std.querysort(req.url);
7171

7272
// Retrieve client user context hash and add it to the forwarded request.
73-
call ez_user_context_hash;
73+
call ibexa_user_context_hash;
7474

7575
// If it passes all these tests, do a lookup anyway.
7676
return (hash);
@@ -117,13 +117,13 @@ sub vcl_backend_response {
117117
// Handle purge
118118
// You may add FOSHttpCacheBundle tagging rules
119119
// See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4
120-
sub ez_purge {
120+
sub ibexa_purge {
121121
// Retrieve purge token, needs to be here due to restart, match for PURGE method done within
122-
call ez_invalidate_token;
122+
call ibexa_invalidate_token;
123123

124124
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl
125125
if (req.method == "PURGEKEYS") {
126-
call ez_purge_acl;
126+
call ibexa_purge_acl;
127127

128128
# If neither of the headers are provided we return 400 to simplify detecting wrong configuration
129129
if (!req.http.xkey-purge && !req.http.xkey-softpurge) {
@@ -146,13 +146,13 @@ sub ez_purge {
146146

147147
# Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl
148148
if (req.method == "PURGE") {
149-
call ez_purge_acl;
149+
call ibexa_purge_acl;
150150

151151
return (purge);
152152
}
153153
}
154154

155-
sub ez_purge_acl {
155+
sub ibexa_purge_acl {
156156
if (req.http.x-invalidate-token) {
157157
if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) {
158158
return (synth(405, "Method not allowed"));
@@ -163,7 +163,7 @@ sub ez_purge_acl {
163163
}
164164

165165
// Sub-routine to get client user context hash, used to for being able to vary page cache on user rights.
166-
sub ez_user_context_hash {
166+
sub ibexa_user_context_hash {
167167

168168
// Prevent tampering attacks on the hash mechanism
169169
if (req.restarts == 0
@@ -212,7 +212,7 @@ sub ez_user_context_hash {
212212
}
213213

214214
// Sub-routine to get invalidate token.
215-
sub ez_invalidate_token {
215+
sub ibexa_invalidate_token {
216216
// Prevent tampering attacks on the token mechanisms
217217
if (req.restarts == 0
218218
&& (req.http.accept ~ "application/vnd.ezplatform.invalidate-token"

0 commit comments

Comments
 (0)