diff --git a/docs/varnish/vcl/parameters.vcl b/docs/varnish/vcl/parameters.vcl index b211df5..bee4751 100644 --- a/docs/varnish/vcl/parameters.vcl +++ b/docs/varnish/vcl/parameters.vcl @@ -2,9 +2,9 @@ // Replace the host to fit your setup // // For additional example see: -// https://github.com/ezsystems/ezplatform/blob/master/doc/docker/entrypoint/varnish/parameters.vcl +// https://github.com/ibexa/docker/blob/main/docker/entrypoint/varnish/parameters.vcl -backend ezplatform { +backend ibexa { .host = "127.0.0.1"; // Replace with hostname/ip of the application server .port = "80"; } @@ -12,10 +12,10 @@ backend ezplatform { // ACL for invalidators IP // // Alternative using HTTPCACHE_VARNISH_INVALIDATE_TOKEN : VCL code also allows for token based invalidation, to use it define a -// shared secret using env variable HTTPCACHE_VARNISH_INVALIDATE_TOKEN and eZ Platform will also use that for configuring this -// bundle. This is prefered for setups such as platform.sh/eZ Platform Cloud, where circular service dependency is +// shared secret using env variable HTTPCACHE_VARNISH_INVALIDATE_TOKEN and Ibexa DXP will also use that for configuring this +// bundle. This is prefered for setups such as Ibexa Cloud, where circular service dependency is // unwanted. If you use this, use a strong cryptological secure hash & make sure to keep the token secret. -// Use ez_purge_acl for invalidation by token. +// Use ibexa_purge_acl for invalidation by token. acl invalidators { "127.0.0.1"; "192.168.0.0"/16; diff --git a/docs/varnish/vcl/varnish5.vcl b/docs/varnish/vcl/varnish5.vcl index 4704935..871fe37 100644 --- a/docs/varnish/vcl/varnish5.vcl +++ b/docs/varnish/vcl/varnish5.vcl @@ -18,7 +18,7 @@ include "parameters.vcl"; sub vcl_recv { // Set the backend - set req.backend_hint = ezplatform; + set req.backend_hint = ibexa; // Add a Surrogate-Capability header to announce ESI support. set req.http.Surrogate-Capability = "abc=ESI/1.0"; @@ -31,7 +31,7 @@ sub vcl_recv { } // Trigger cache purge if needed - call ez_purge; + call ibexa_purge; // Don't cache requests other than GET and HEAD. if (req.method != "GET" && req.method != "HEAD") { @@ -72,7 +72,7 @@ sub vcl_recv { set req.url = std.querysort(req.url); // Retrieve client user context hash and add it to the forwarded request. - call ez_user_context_hash; + call ibexa_user_context_hash; // If it passes all these tests, do a lookup anyway. return (hash); @@ -142,13 +142,13 @@ sub vcl_backend_response { // Handle purge // You may add FOSHttpCacheBundle tagging rules // See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4 -sub ez_purge { +sub ibexa_purge { // Retrieve purge token, needs to be here due to restart, match for PURGE method done within - call ez_invalidate_token; + call ibexa_invalidate_token; # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl if (req.method == "PURGEKEYS") { - call ez_purge_acl; + call ibexa_purge_acl; # If neither of the headers are provided we return 400 to simplify detecting wrong configuration if (!req.http.xkey-purge && !req.http.xkey-softpurge) { @@ -171,13 +171,13 @@ sub ez_purge { # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl if (req.method == "PURGE") { - call ez_purge_acl; + call ibexa_purge_acl; return (purge); } } -sub ez_purge_acl { +sub ibexa_purge_acl { if (req.http.x-invalidate-token) { if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) { return (synth(405, "Method not allowed")); @@ -188,7 +188,7 @@ sub ez_purge_acl { } // Sub-routine to get client user context hash, used to for being able to vary page cache on user rights. -sub ez_user_context_hash { +sub ibexa_user_context_hash { // Prevent tampering attacks on the hash mechanism if (req.restarts == 0 @@ -237,7 +237,7 @@ sub ez_user_context_hash { } // Sub-routine to get invalidate token. -sub ez_invalidate_token { +sub ibexa_invalidate_token { // Prevent tampering attacks on the token mechanisms if (req.restarts == 0 && (req.http.accept ~ "application/vnd.ezplatform.invalidate-token" diff --git a/docs/varnish/vcl/varnish6.vcl b/docs/varnish/vcl/varnish6.vcl index d3f91ab..3fe4e16 100644 --- a/docs/varnish/vcl/varnish6.vcl +++ b/docs/varnish/vcl/varnish6.vcl @@ -18,7 +18,7 @@ include "parameters.vcl"; sub vcl_recv { // Set the backend - set req.backend_hint = ezplatform; + set req.backend_hint = ibexa; // Add a Surrogate-Capability header to announce ESI support. set req.http.Surrogate-Capability = "abc=ESI/1.0"; @@ -31,7 +31,7 @@ sub vcl_recv { } // Trigger cache purge if needed - call ez_purge; + call ibexa_purge; // Don't cache requests other than GET and HEAD. if (req.method != "GET" && req.method != "HEAD") { @@ -72,7 +72,7 @@ sub vcl_recv { set req.url = std.querysort(req.url); // Retrieve client user context hash and add it to the forwarded request. - call ez_user_context_hash; + call ibexa_user_context_hash; // If it passes all these tests, do a lookup anyway. return (hash); @@ -142,13 +142,13 @@ sub vcl_backend_response { // Handle purge // You may add FOSHttpCacheBundle tagging rules // See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4 -sub ez_purge { +sub ibexa_purge { // Retrieve purge token, needs to be here due to restart, match for PURGE method done within - call ez_invalidate_token; + call ibexa_invalidate_token; # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl if (req.method == "PURGEKEYS") { - call ez_purge_acl; + call ibexa_purge_acl; # If neither of the headers are provided we return 400 to simplify detecting wrong configuration if (!req.http.xkey-purge && !req.http.xkey-softpurge) { @@ -171,13 +171,13 @@ sub ez_purge { # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl if (req.method == "PURGE") { - call ez_purge_acl; + call ibexa_purge_acl; return (purge); } } -sub ez_purge_acl { +sub ibexa_purge_acl { if (req.http.x-invalidate-token) { if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) { return (synth(405, "Method not allowed")); @@ -188,7 +188,7 @@ sub ez_purge_acl { } // Sub-routine to get client user context hash, used to for being able to vary page cache on user rights. -sub ez_user_context_hash { +sub ibexa_user_context_hash { // Prevent tampering attacks on the hash mechanism if (req.restarts == 0 @@ -237,7 +237,7 @@ sub ez_user_context_hash { } // Sub-routine to get invalidate token. -sub ez_invalidate_token { +sub ibexa_invalidate_token { // Prevent tampering attacks on the token mechanisms if (req.restarts == 0 && (req.http.accept ~ "application/vnd.ezplatform.invalidate-token" diff --git a/docs/varnish/vcl/varnish7.vcl b/docs/varnish/vcl/varnish7.vcl index eafb9d7..a458f7f 100644 --- a/docs/varnish/vcl/varnish7.vcl +++ b/docs/varnish/vcl/varnish7.vcl @@ -16,7 +16,7 @@ include "/etc/varnish/parameters.vcl"; sub vcl_recv { // Set the backend - set req.backend_hint = ezplatform; + set req.backend_hint = ibexa; // Add a Surrogate-Capability header to announce ESI support. set req.http.Surrogate-Capability = "abc=ESI/1.0"; @@ -29,7 +29,7 @@ sub vcl_recv { } // Trigger cache purge if needed - call ez_purge; + call ibexa_purge; // Don't cache requests other than GET and HEAD. if (req.method != "GET" && req.method != "HEAD") { @@ -70,7 +70,7 @@ sub vcl_recv { set req.url = std.querysort(req.url); // Retrieve client user context hash and add it to the forwarded request. - call ez_user_context_hash; + call ibexa_user_context_hash; // If it passes all these tests, do a lookup anyway. return (hash); @@ -117,13 +117,13 @@ sub vcl_backend_response { // Handle purge // You may add FOSHttpCacheBundle tagging rules // See http://foshttpcache.readthedocs.org/en/latest/varnish-configuration.html#id4 -sub ez_purge { +sub ibexa_purge { // Retrieve purge token, needs to be here due to restart, match for PURGE method done within - call ez_invalidate_token; + call ibexa_invalidate_token; # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_tags_xkey.vcl if (req.method == "PURGEKEYS") { - call ez_purge_acl; + call ibexa_purge_acl; # If neither of the headers are provided we return 400 to simplify detecting wrong configuration if (!req.http.xkey-purge && !req.http.xkey-softpurge) { @@ -146,13 +146,13 @@ sub ez_purge { # Adapted with acl from vendor/friendsofsymfony/http-cache/resources/config/varnish/fos_purge.vcl if (req.method == "PURGE") { - call ez_purge_acl; + call ibexa_purge_acl; return (purge); } } -sub ez_purge_acl { +sub ibexa_purge_acl { if (req.http.x-invalidate-token) { if (req.http.x-invalidate-token != req.http.x-backend-invalidate-token) { return (synth(405, "Method not allowed")); @@ -163,7 +163,7 @@ sub ez_purge_acl { } // Sub-routine to get client user context hash, used to for being able to vary page cache on user rights. -sub ez_user_context_hash { +sub ibexa_user_context_hash { // Prevent tampering attacks on the hash mechanism if (req.restarts == 0 @@ -212,7 +212,7 @@ sub ez_user_context_hash { } // Sub-routine to get invalidate token. -sub ez_invalidate_token { +sub ibexa_invalidate_token { // Prevent tampering attacks on the token mechanisms if (req.restarts == 0 && (req.http.accept ~ "application/vnd.ezplatform.invalidate-token"