Skip to content

Commit 86cb4d1

Browse files
committed
IBX-4004 Upgrade doc for 4.1 missing Fastly VCL changes needed for shielding support (#1878)
1 parent 22b1ea6 commit 86cb4d1

File tree

7 files changed

+46
-5
lines changed

7 files changed

+46
-5
lines changed
File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
If you use Fastly, deploy the most up-to-date VCL configuration.
2+
3+
Locate the `vendor/ibexa/fastly/fastly/ez_main.vcl` file,
4+
make sure that it has been updated with the following changes, and upload it to your Fastly:
5+
6+
- Add the following lines:
7+
8+
``` vcl
9+
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
10+
set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
11+
}
12+
```
13+
14+
- Move the `#FASTLY recv` macro call to a new location, right after the `Preserve X-Forwarded-For in all requests` section.

docs/updating/from_1.x_2.x/update_db_to_2.5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ You do this manually by following this procedure:
886886

887887
###### VCL configuration for Fastly
888888

889-
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
889+
[[% include 'snippets/update/vcl_configuration_for_fastly.md_v3' %]]
890890

891891
##### Optimize workflow queries
892892

docs/updating/from_2.5/to_3.3.latest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ You do this manually by following this procedure:
4343

4444
#### VCL configuration for Fastly
4545

46-
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
46+
[[% include 'snippets/update/vcl_configuration_for_fastly.md_v3' %]]
4747

4848
#### Optimize workflow queries
4949

docs/updating/from_3.3/update_from_3.3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ You do this manually by following this procedure:
109109

110110
#### VCL configuration for Fastly
111111

112-
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
112+
[[% include 'snippets/update/vcl_configuration_for_fastly.md_v3' %]]
113113

114114
#### Optimize workflow queries
115115

docs/updating/from_4.0/to_4.1.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ Next, run:
9494
composer run post-install-cmd
9595
```
9696

97-
9897
### Update the database
9998

10099
[[% include 'snippets/update/db/db_backup_warning.md' %]]
@@ -162,6 +161,20 @@ Apply the following database update scripts:
162161
psql <database_name> < vendor/ibexa/installer/upgrade/db/postgresql/ibexa-4.1.0-to-4.1.1.sql
163162
```
164163

164+
### v4.1.6
165+
166+
#### VCL configuration for Fastly
167+
168+
The Fastly `.vcl` configuration files have changed.
169+
Follow the upgrade steps below to update them:
170+
171+
1. Locate the `vendor/ibexa/fastly/fastly/ez_main.vcl` file and update your VCL file with the recent changes.
172+
2. Do the same with `vendor/ibexa/fastly/fastly/ez_user_hash.vcl`.
173+
3. Upload a new `snippet_re_enable_shielding.vcl` snippet file, based on `vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl`.
174+
175+
Once the VCL configuration has been updated,
176+
you may enable [Fastly Shielding](https://docs.fastly.com/en/guides/shielding) if you prefer.
177+
165178
## Configure the product catalog
166179

167180
!!! caution

docs/updating/from_4.1/update_from_4.1.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,20 @@ Run:
3232
composer require ibexa/commerce:[[= latest_tag_4_1 =]] --with-all-dependencies --no-scripts
3333
```
3434

35+
### VCL configuration for Fastly
36+
37+
You can omit this step if you already performed it during update to v4.1.6.
38+
39+
The Fastly `.vcl` configuration files have changed.
40+
Follow the upgrade steps below to update them:
41+
42+
1. Locate the `vendor/ibexa/fastly/fastly/ez_main.vcl` file and update your VCL file with the recent changes.
43+
2. Do the same with `vendor/ibexa/fastly/fastly/ez_user_hash.vcl`.
44+
3. Upload a new `snippet_re_enable_shielding.vcl` snippet file, based on `vendor/ibexa/fastly/fastly/snippet_re_enable_shielding.vcl`.
45+
46+
Once the VCL configuration has been updated,
47+
you may enable [Fastly Shielding](https://docs.fastly.com/en/guides/shielding) if you prefer.
48+
3549
## Update from v4.1.latest to v4.2
3650

3751
When you have the latest version of v4.1, you can update to v4.2.
@@ -131,4 +145,4 @@ otherwise you can encounter errors during compiling.
131145
``` bash
132146
rm -Rf node_modules
133147
rm -Rf yarn.lock
134-
```
148+
```

0 commit comments

Comments
 (0)