Allow variables for origin mappings

Configure your sandbox client to accommodate dynamic origin values.

Before you begin

In order to complete this step, you must have already downloaded the Sandbox client.

If you have origin values that are generated at run time using Property Manager variables, you can configure your sandbox to support wildcards.

How to

  1. Open your config.json file.
  2. Modify the from field in the "originMappings" section to point to your development origin. into the from field under origin mappings
    • Allow all origin values to pass through.
      
            "originMappings":[  
          {  
              "from":"*.*",
              "to":"pass-through"
          }
    • Allow a specific subdomain wildcard origin value to pass through.
      
            "originMappings":[  
          {  
              "from":"*.example.com",
              "to":"pass-through"
          }
    • Allow a specific subdomain wildcard to go to another origin.
      "originMappings":[  
          {  
              "from":"*.example.com",
              "to":[  
                  "host":"127.0.0.1",
                  "port":9001,
                  "secure":false,
                  "hostHeader":"origin-dev.example.com"
              ]
          }