0c475c246e
- When a caching ttl of zero is set, we do not cache anything on the edge server. We instead set ttl cache type to be `no-store` where a response is never cached, and if any prior policy has allowed objects to be cached, this setting will evict the corresponding cache entry. Change-Id: I8b8da3202285f5ae94a960d5bf878cf267cbbea6
314 lines
12 KiB
JSON
314 lines
12 KiB
JSON
{
|
|
"add_domain": [
|
|
{"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}}
|
|
],
|
|
"replace_domain": [
|
|
{"op": "replace",
|
|
"path": "/domains/0",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}}
|
|
],
|
|
"add_multiple_domains": [
|
|
{"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}},
|
|
{"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}}
|
|
],
|
|
"add_same_domains_with_different_ssl": [
|
|
{"skip_test": true,
|
|
"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}},
|
|
{"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "https"}}
|
|
],
|
|
"add_and_remove_domains": [
|
|
{"op": "add",
|
|
"path": "/domains/-",
|
|
"value": {"domain": "replaceme.com", "protocol": "http"}},
|
|
{"op": "remove",
|
|
"path": "/domains/0"}
|
|
],
|
|
"add_domain_list": [
|
|
{"op": "add",
|
|
"path": "/domains",
|
|
"value": [{"domain": "replaceme.com", "protocol": "http"}]}
|
|
],
|
|
"replace_service_name": [
|
|
{"op": "replace",
|
|
"path": "/name",
|
|
"value": "chimp"}
|
|
],
|
|
"replace_origin": [
|
|
{"op": "replace",
|
|
"path": "/origins/0",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "rules": [{"name": "default", "request_url": "/replacement"}], "ssl": false, "hostheadertype": "custom", "hostheadervalue": "www.customweb.com"}}
|
|
],
|
|
"replace_origin_no_slashes_request_url": [
|
|
{"op": "replace",
|
|
"path": "/origins/0",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "rules": [{"name": "default", "request_url": "replacement"}], "ssl": false, "hostheadertype": "custom", "hostheadervalue": "www.customweb.com"}}
|
|
],
|
|
"add_origin": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}]}
|
|
}
|
|
],
|
|
"add_origin_with_minimum_length_rule_name": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "o", "request_url" : "/origin.html"}]}
|
|
}
|
|
],
|
|
"add_origin_with_minimum_length_request_url": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/"}]}
|
|
}
|
|
],
|
|
"add_multiple_origins": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}]}
|
|
},
|
|
{"op": "add",
|
|
"path": "/origins/2",
|
|
"value": {"origin": "4.2.5.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin2.htm"}]}
|
|
}
|
|
],
|
|
"add_same_origins_with_different_ssl": [
|
|
{"skip_test": true,
|
|
"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 443, "ssl": true,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}]}
|
|
},
|
|
{"op": "add",
|
|
"path": "/origins/2",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin2.htm"}]}
|
|
}
|
|
],
|
|
"add_multiple_origins_rules": [
|
|
{"op": "add",
|
|
"path": "/origins/0/rules/-",
|
|
"value": {"name": "Origin Rule 1", "request_url": "/cats"}
|
|
},
|
|
{"op": "add",
|
|
"path": "/origins/0/rules/-",
|
|
"value": {"name": "Origin Rule 2", "request_url": "/dogs"}
|
|
}
|
|
],
|
|
"add_and_remove_origin": [
|
|
{"op": "add",
|
|
"path": "/origins/-",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}]}
|
|
},
|
|
{"op": "remove",
|
|
"path": "/origins/0"}
|
|
],
|
|
"add_origin_with_origin_hostheadertype": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}], "hostheadertype": "origin"}
|
|
}
|
|
],
|
|
"add_origin_with_custom_hostheadertype": [
|
|
{"op": "add",
|
|
"path": "/origins/1",
|
|
"value": {"origin": "1.2.3.4", "port": 80, "ssl": false,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin.htm"}], "hostheadertype": "custom", "hostheadervalue": "www.mycustom.com"}
|
|
}
|
|
],
|
|
"add_caching": [
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name", "ttl": 111,
|
|
"rules": [{"name" : "index","request_url" : "/cats.jpg"}] }}
|
|
],
|
|
"add_caching_with_minimum_length_name": [
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "c", "ttl": 111,
|
|
"rules": [{"name" : "index","request_url" : "/minimum_length_name.htm"}]}}
|
|
],
|
|
"add_caching_with_minimum_length_rule_name": [
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name", "ttl": 111,
|
|
"rules": [{"name" : "i","request_url" : "/minimum_length_rule_name.htm"}]}}
|
|
],
|
|
"add_caching_with_minimum_length_request_url": [
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name", "ttl": 111,
|
|
"rules": [{"name" : "index","request_url" : "/"}]}}
|
|
],
|
|
"replace_caching": [
|
|
{"op": "replace",
|
|
"path": "/caching/0",
|
|
"value": {"name": "cache_name", "ttl": 111, "rules": [{"name" : "index","request_url" : "/new_path/*"}]}}
|
|
],
|
|
"replace_caching_no_slashes_request_url": [
|
|
{"op": "replace",
|
|
"path": "/caching/0",
|
|
"value": {"name": "cache_name", "ttl": 111, "rules": [{"name" : "index","request_url" : "new_path"}]}}
|
|
],
|
|
"replace_caching_with_zero_ttl": [
|
|
{"op": "replace",
|
|
"path": "/caching/0",
|
|
"value": {"name": "dynamic_cache", "ttl": 0, "rules": [{"name" : "dynamic","request_url" : "/latest_news/*"}]}}
|
|
],
|
|
"remove_caching": [
|
|
{"op": "remove",
|
|
"path": "/caching/0"}
|
|
],
|
|
"add_multiple_caching": [
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name", "ttl": 111,
|
|
"rules": [{"name" : "index","request_url" : "/dogs.jpg"}]}
|
|
},
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name2", "ttl": 121,
|
|
"rules": [{"name" : "index2",
|
|
"request_url" : "/index2.htm"}]}
|
|
},
|
|
{"op": "add",
|
|
"path": "/caching/-",
|
|
"value": {"name": "cache_name3", "ttl": 0,
|
|
"rules": [{"name" : "index3",
|
|
"request_url" : "/index3.htm"}]}
|
|
}
|
|
],
|
|
"add_restrictions": [
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images/*"}]
|
|
}}
|
|
],
|
|
"replace_restrictions":[
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images2/*"}]
|
|
}},
|
|
{"op": "replace",
|
|
"path": "/restrictions/0",
|
|
"value": {"name": "new_restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/*"}]
|
|
}}
|
|
],
|
|
"replace_restrictions_no_slashes_request_url":[
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images2/*"}]
|
|
}},
|
|
{"op": "replace",
|
|
"path": "/restrictions/0",
|
|
"value": {"name": "new_restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "images2"}]
|
|
}}
|
|
],
|
|
"remove_restrictions": [
|
|
{"op": "remove",
|
|
"path": "/restrictions/0"}
|
|
],
|
|
"add_restrictions_with_minimum_length_name": [
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "r",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images/*"}]
|
|
}
|
|
}
|
|
],
|
|
"replace_restrictions_white_to_blacklist":[
|
|
{"op": "replace",
|
|
"path": "/restrictions/0",
|
|
"value": {"name": "new_restricted",
|
|
"type": "blacklist",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images2/*"}]
|
|
}}
|
|
],
|
|
"replace_restrictions_black_to_whitelist":[
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"type": "blacklist",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images3/*"}]
|
|
}},
|
|
{"op": "replace",
|
|
"path": "/restrictions/1",
|
|
"value": {"name": "new_restricted",
|
|
"type": "whitelist",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images3/*"}]
|
|
}}
|
|
],
|
|
"replace_restrictions_black_to_default":[
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"type": "blacklist",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images3/*"}]
|
|
}},
|
|
{"op": "replace",
|
|
"path": "/restrictions/1",
|
|
"value": {"name": "new_restricted",
|
|
"rules": [{"name": "rule1", "referrer": "www.thesite.com", "request_url": "/images3/*"}]
|
|
}}
|
|
],
|
|
"add_restrictions_with_minimum_length_rule_name": [
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"rules": [{"name": "r", "referrer": "www.thesite.com", "request_url": "/images/*"}]
|
|
}
|
|
}
|
|
],
|
|
"add_restrictions_with_minimum_length_referrer": [
|
|
{"op": "add",
|
|
"path": "/restrictions/-",
|
|
"value": {"name": "restricted",
|
|
"rules": [{"name": "rule1", "referrer": "a.co", "request_url":"/images/*"}]
|
|
}
|
|
}
|
|
],
|
|
"enable_log_delivery": [
|
|
{"op": "replace",
|
|
"path": "/log_delivery/enabled",
|
|
"value": true}
|
|
],
|
|
"disable_log_delivery": [
|
|
{"op": "replace",
|
|
"path": "/log_delivery/enabled",
|
|
"value": false}
|
|
],
|
|
"add_ssl_domain_origin": [
|
|
{
|
|
"op": "replace",
|
|
"path": "/domains/0",
|
|
"value": {"domain": "replaceme.com", "protocol": "https",
|
|
"certificate": "shared"}},
|
|
{"op": "replace",
|
|
"path": "/origins/0",
|
|
"value": {"origin": "1.1.1.1", "port": 443, "ssl": true,
|
|
"rules": [{"name" : "origin", "request_url" : "/origin2.htm"}], "hostheadertype": "custom", "hostheadervalue": "www.customweb.com"}}
|
|
],
|
|
"empty_list": []
|
|
}
|