Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ Server: nginx/1.27.0
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: eZSESSID21232f297a57a5a743894a0e4a801fc3=asrpqgmh5ll5ssseca3cov8er7; path=/; HttpOnly; SameSite=lax
Set-Cookie: IBX_SESSION_ID21232f297a57a5a743894a0e4a801fc3=asrpqgmh5ll5ssseca3cov8er7; path=/; HttpOnly; SameSite=lax
Cache-Control: public, s-maxage=86400
Date: Wed, 01 Sep 2021 07:51:40 GMT
Vary: Origin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function addPreferenceHash(FilterResponseEvent $event)
2\. Adapt VCL logic to pass the header to requests:

```diff
@@ -174,6 +174,7 @@ sub ez_user_context_hash {
@@ -174,6 +174,7 @@ sub ibexa_user_context_hash {
if (req.restarts == 0
&& (req.http.accept ~ "application/vnd.fos.user-context-hash"
|| req.http.X-Context-User-Hash
Expand Down
24 changes: 12 additions & 12 deletions docs/infrastructure_and_maintenance/cache/http_cache/fastly.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
All commands are explained in detail [below](#view-and-modify-vcl-configuration):

``` bash
fastly vcl custom create --name=ez_main.vcl --version=active --autoclone --content=vendor/ibexa/fastly/fastly/ez_main.vcl --main
fastly vcl custom create --name=ez_user_hash.vcl --content=vendor/ibexa/fastly/fastly/ez_user_hash.vcl --version=latest
fastly vcl custom create --name=ibexa_main.vcl --version=active --autoclone --content=vendor/ibexa/fastly/fastly/ibexa_main.vcl --main
fastly vcl custom create --name=ibexa_user_hash.vcl --content=vendor/ibexa/fastly/fastly/ibexa_user_hash.vcl --version=latest
fastly vcl snippet create --name="Re-Enable shielding on restart" --version=latest --priority 100 --type recv --content=vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl
fastly service-version activate --version=latest
```
Expand Down Expand Up @@ -117,30 +117,30 @@

Fastly configuration is stored in Varnish Configuration Language (VCL) files.
You can change the behaviour of Fastly by [uploading custom VCL files](https://docs.fastly.com/en/guides/uploading-custom-vcl).
[[= product_name =]] ships with two VCL files that need to be enabled for Fastly to work correctly with the platform; `ez_main.vcl` and `ez_user_hash.vcl` (located in `vendor/ibexa/fastly/fastly/`)
[[= product_name =]] ships with two VCL files that need to be enabled for Fastly to work correctly with the platform; `ibexa_main.vcl` and `ibexa_user_hash.vcl` (located in `vendor/ibexa/fastly/fastly/`)

Check warning on line 120 in docs/infrastructure_and_maintenance/cache/http_cache/fastly.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/infrastructure_and_maintenance/cache/http_cache/fastly.md#L120

[Ibexa.Semicolon] Only use the semicolon if you're absolutely sure what you're doing.
Raw output
{"message": "[Ibexa.Semicolon] Only use the semicolon if you're absolutely sure what you're doing.", "location": {"path": "docs/infrastructure_and_maintenance/cache/http_cache/fastly.md", "range": {"start": {"line": 120, "column": 117}}}, "severity": "WARNING"}

### List custom `.vcl` files for specific version

``` bash
fastly vcl custom list --version 77
SERVICE ID VERSION NAME MAIN
4SEKDky8P3wdrctwZCi1C1 77 ez_main.vcl true
4SEKDky8P3wdrctwZCi1C1 77 ez_user_hash.vcl false
4SEKDky8P3wdrctwZCi1C1 77 ibexa_main.vcl true
4SEKDky8P3wdrctwZCi1C1 77 ibexa_user_hash.vcl false
```

### Get `ez_main.vcl` for specific version
### Get ibexa_main.vcl for specific version

``` bash
fastly vcl custom describe --name=ez_main.vcl --version=77
fastly vcl custom describe --name=ibexa_main.vcl --version=77

Service ID: 4SEKDky8P3wdrctwZCi1C1
Service Version: 77

Name: ez_main.vcl
Name: ibexa_main.vcl
Main: true
Content:

include "ez_user_hash.vcl"
include "ibexa_user_hash.vcl"

sub vcl_recv {
(....)
Expand Down Expand Up @@ -198,7 +198,7 @@
Create a new version based on the one that is currently active, and upload the file:

``` bash
fastly vcl custom update --name=ez_main.vcl --version=active --autoclone --content=vendor/ibexa/fastly/fastly/ez_main.vcl
fastly vcl custom update --name=ibexa_main.vcl --version=active --autoclone --content=vendor/ibexa/fastly/fastly/ibexa_main.vcl
```

Provide a description of the change in Fastly's version system:
Expand All @@ -220,7 +220,7 @@
it's recommended that you use snippets instead of changing the VCL files provided by [[= product_name =]] as much as possible, which makes it easier to upgrade the [[= product_name =]] VCL configuration later.

When you use snippets, the snippet code is injected into the VCL where the `#FASTLY ...` macros are placed.
For example, if you create a snippet for the `recv` subroutine, it's injected into the `ez_main.vcl` file, the
For example, if you create a snippet for the `recv` subroutine, it's injected into the `ibexa_main.vcl` file, the
line where `#FASTLY recv` is found.

### List available snippets for specific version
Expand All @@ -232,7 +232,7 @@
```

!!! note
As of version 3.3.24, 4.1.6 and 4.2.0, [[= product_name =]] also requires one snippet to be installed, in addition to the custom VCLs `ez_main.vcl` and `ez_user_hash.vcl`. That snippet is by default named `Re-Enable shielding on restart`.
As of version 3.3.24, 4.1.6 and 4.2.0, [[= product_name =]] also requires one snippet to be installed, in addition to the custom VCLs `ibexa_main.vcl` and `ibexa_user_hash.vcl`. That snippet is by default named `Re-Enable shielding on restart`.

### Get details of installed snippets

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ For reverse proxies to work properly with your installation, you need to add the

- [Varnish VCL xkey example](https://github.com/ibexa/http-cache/blob/main/docs/varnish/vcl/varnish5.vcl)
- Fastly can be found in `vendor/ibexa/fastly/fastly`. You must install the following to use Fastly:
- `ez_main.vcl` as the **main** custom VCL
- `ez_user_hash.vcl` as another custom VCL
- `ibexa_main.vcl` as the **main** custom VCL
- `ibexa_user_hash.vcl` as another custom VCL
- `snippet_re_enable_shielding.vcl` as snippet

The provided `.vcl` files work both with [Fastly Shielding](https://docs.fastly.com/en/guides/shielding) enabled and without it.
Expand Down Expand Up @@ -155,7 +155,7 @@ If you want to use Basic Auth with Fastly on [[= product_name_cloud =]], please

!!! note "Invalidating Varnish cache by using tokens"

In setups where the Varnish server IP can change (for example, on [[= product_name_cloud =]]), you can use token-based cache invalidation through [`ez_purge_acl`](https://github.com/ibexa/http-cache/blob/main/docs/varnish/vcl/varnish5.vcl#L174).
In setups where the Varnish server IP can change (for example, on [[= product_name_cloud =]]), you can use token-based cache invalidation through [`ibexa_purge_acl`](https://github.com/ibexa/http-cache/blob/main/docs/varnish/vcl/varnish5.vcl#L174).

In such situation, use strong, secure hash and make sure to keep the token secret.

Expand Down
Loading