Using data to specify edge dictionaries

Compute fiddles support specifying data to expose to your application as edge dictionaries. The data provided in the fiddle settings can be read in the same way as any other edge dictionary, via the dedicated interfaces in our Compute SDKs:

HINT: VCL fiddles do not yet support edge dictionaries but you can write VCL tables directly in the INIT field. In the Compute platform, dictionary lookups trigger a platform behavior at runtime, while in VCL services dictionaries are rendered into the VCL source code as tables at compile time. As a result, you can effectively simulate an edge dictionary in a VCL fiddle by using a table declaration.

Populating dictionary data

Click the 'Data' option under the request configuration to open the data editor.

Location of the data menu in Fiddle

Type your data in YAML format, under a top level dictionaries: key. Keys under the top level dictionaries key are the names of dictionaries, and within each dictionary, specify key-value pairs to populate the dictionary items.

dictionaries:
config:
rate_limiting: "on"
banned_geos: "de:ru:au:jp"
redirects:
/demos: "/content/sections/d952gab58gf4wdv"

Currently the only valid top-level key within the data field is dictionaries.

Querying dictionaries from edge code

The Compute platform offers a dictionary interface in all supported SDKs. Code examples of dictionary lookups are included on our language specific overviews. See choosing a language in the Compute onboarding guide.