Skip to content

Commit 3a93767

Browse files
authored
IBX-2336 documented: "Move VCL macro call" (#1565)
* IBX-2336 documented: "Move VCL macro call" * Review comments implemented
1 parent 6650e65 commit 3a93767

File tree

4 files changed

+16
-27
lines changed

4 files changed

+16
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
If you use Fastly, deploy the most up-to-date VCL configuration.
2+
3+
Locate the `vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl` file, make sure that it has been updated with the following changes, and upload it to your Fastly:
4+
5+
- Add the following lines:
6+
7+
``` vcl
8+
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
9+
set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
10+
}
11+
```
12+
13+
- 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

+1-9
Original file line numberDiff line numberDiff line change
@@ -880,15 +880,7 @@ You do this manually by following this procedure:
880880

881881
###### VCL configuration for Fastly
882882

883-
If you use Fastly, update your VCL configuration.
884-
885-
Locate the `vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl` file and add the following lines to it:
886-
887-
``` vcl
888-
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
889-
set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
890-
}
891-
```
883+
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
892884

893885
##### Optimize workflow queries
894886

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

+1-9
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,7 @@ You do this manually by following this procedure:
4343

4444
#### VCL configuration for Fastly
4545

46-
If you use Fastly, update your VCL configuration.
47-
48-
Locate the `vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl` file and add the following lines to it:
49-
50-
``` vcl
51-
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
52-
set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
53-
}
54-
```
46+
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
5547

5648
#### Optimize workflow queries
5749

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

+1-9
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,7 @@ You do this manually by following this procedure:
106106

107107
#### VCL configuration for Fastly
108108

109-
If you use Fastly, update your VCL configuration.
110-
111-
Locate the `vendor/ezsystems/ezplatform-http-cache-fastly/fastly/ez_main.vcl` file and add the following lines to it:
112-
113-
``` vcl
114-
if (req.restarts == 0 && resp.status == 301 && req.http.x-fos-original-url) {
115-
set resp.http.location = regsub(resp.http.location, "/_fos_user_context_hash", req.http.x-fos-original-url);
116-
}
117-
```
109+
[[% include 'snippets/update/vcl_configuration_for_fastly.md' %]]
118110

119111
#### Optimize workflow queries
120112

0 commit comments

Comments
 (0)