To have code occur immediately, use a lower value, such as 5. If you want an action to occur last or to override Magento default VCL snippets, use a higher number, such as 100. All uploaded snippets from a Magento module have a value of 50. priority-Determines the order VCL snippets call.See Fastly VCL snippet object values for information on these values. type-Specifies a location for the generated snippet, such as init (above subroutines) and recv (within subroutines).dynamic-Indicates if this is a dynamic snippet or regular snippet.The following is an example of a returned JSON for a customer VCL snippet: Make note of the version number for an active snippet. Indicates if the snippet or version is activated and in use. Indicates if this is a dynamic snippet or regular snippet. If you do not set a priority with your cURL command, the default value set is `100`. Priority `100` is best for overriding default VCL snippet code. To have code occur immediately, use a lower value, such as `5`.Īny VCL snippet with a priority value of `5` runs immediately, which is best for blacklists, whitelists, and redirects. If you want an action to occur last or to override Magento default VCL snippets, use a higher number, such as `100`. All uploaded snippets from a Magento module have a value of `50`. Lower values run first, from `1` to `100`. The VCL snippet code, cURL commands, and bash script require the content code in a single line.ĭetermines the order VCL snippets call. We recommend keeping this code in a single line. Specifies a location for the generated snippet, such as init (above subroutines) and recv (within subroutines). Add the SERVICE_ID_VERSION key in the bash script. Fastly uses Editable Version # in their example values. The version of service for validating and activating. The API Key to access your Fastly account. Add the SERVICE_ID key to set up your bash script for custom VCL snippets. The ID of a specific Staging or Production environment. You can use the following key/value pairs in JSON snippets in VCL files and in cURL commands. The custom VCL snippet process-Walks you through the entire process, including links to custom VCL snippets you can create with ease.Understand VCL snippet values-Provides an overview of values for Fastly VCL JSON.Fastly API key used for the FASTLY_API_TOKEN in the commands.Fastly Service ID for Staging and Production to assign the snippets to a specific service or environment. The following walk-through show you how to create regular VCL snippet files using JSON code. You do not need an SSH connection into a specific environment. Use the terminal application to create and upload VCL snippets. The following examples and instructions walk through creating edge dictionaries, edge ACLs, and VCL snippets. You are free to customize your Fastly VCL snippets to complete custom code. For best results, we recommend creating Edge Dictionaries and Edge ACLs for your VCL snippets. įastly and Magento Commerce Cloud support creating custom Varnish Configuration Language (VCL) snippets. For the latest supported documentation, see. This archived documentation is not supported.
0 Comments
Leave a Reply. |