Origin

setOriginTemplate

Required. The origin server is where your source content lives, so this setting is obligatory. Edge servers use this location to fetch your content from.

{
  "name": "setOriginTemplate",
  "options": {
    "originName": "main"
  }
}

Origin configuration is a two-step model in this API, and it's the one piece of the template that isn't entirely inside defaultSettings:

  • origins[], at the top level of the environment version, defines each origin and its connection settings. The template provides one named main with empty options.
  • setOriginTemplate.originName selects which of those origins the default settings use.
{
  "origins": [
    {
      "originName": "main",
      "options": {
        "hostname": "origin.example.com"
      }
    }
  ]
}

originName is write-once and must match an entry in origins[]. Ion supports five origin
authentication methods set through the origin's options, not through this setting.

To send some requests to a different origin, for example for a localized content, or special handling for particular user agents, add an originServer behavior to a rule rather than editing this setting.