Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d0ddc0

Browse files
committed
Added warning about VCL snippet format
- Warned customers that custom VCL snippet example is formatted as a JSON payload for use in Fastly API requests - Indicated that special characters in VCL code snippet must be escaped when submitting snippets from the Magento Admin UI
1 parent 241d04b commit 2d0ddc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/cloud/cdn/cloud-vcl-custom-snippets.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can create and manage custom VCL snippets from the Magento Admin UI or by us
4545

4646
### Example VCL snippet code {#vcl-curl}
4747

48-
The following example shows the JSON code for a custom VCL snippet that filters traffic by client IP address.
48+
The following example shows the custom VCL snippet that filters traffic by client IP address in JSON format.
4949

5050
```json
5151
{
@@ -59,9 +59,16 @@ The following example shows the JSON code for a custom VCL snippet that filters
5959
}
6060
```
6161

62+
{: .bs-callout-warning}
63+
In this example, the VCL code is formatted as a JSON payload that can be saved to a file and submitted in a Fastly API request. If you submit the VCL code snippet from the Magento Admin UI, or as a JSON string using the Fastly API, you must escape special characters to prevent validation errors. See the example in [Secure the Magento Admin UI]({{ site.baseurl }}/cloud/cdn/fastly-vcl-whitelist.html#vcl) topic.
64+
6265
The VCL logic in the `content` field performs the following actions:
6366

64-
- Checks the incoming IP address, `client.ip` on each request
67+
- Checks the incoming IP address, `client.ip` on each request
68+
69+
- Blocks any request with an IP address included in the *ACLNAME* edge ACL, returning a `403 Forbidden` error
70+
71+
The following table provides details about key data for custom VCL snippets. For a more detailed reference, see the [VCL snippets](https://docs.fastly.com/api/config#api-section-snippet) reference in the Fastly documentation.
6572

6673
- Blocks any request with an IP address included in the *ACLNAME* edge ACL, returning a `403 Forbidden` error
6774

0 commit comments

Comments
 (0)