v0.42.0
This commit is contained in:
1 parent
6df256cdbb
commit
0d6249e383
159 files changed
+16737
-1971
No files matched your search
@@ -0,0 +1,33 @@
|
||||
# Imported VCL regression fixtures
|
||||
|
||||
These are test inputs, including deliberately unsafe and rejected examples;
|
||||
they are not production configuration recipes.
|
||||
|
||||
The `.vcl` files can be imported through the authenticated
|
||||
`/api/cache/rules/import-vcl` endpoint. Adjacent `.json` files preserve 0.41.4
|
||||
import snapshots; `.candidate.json` files record the corrected 0.42.0 importer.
|
||||
Only randomized `vcl_flow.group` identifiers are normalized to `g1`, `g2`, etc.
|
||||
for comparison. Active configurations must retain their actual identifiers.
|
||||
|
||||
The `legacy_mutating_*` examples cover branch selection when a selected branch
|
||||
changes or removes the header used by its condition. Their baseline snapshots
|
||||
retain the old flattened structure. `header_stages` and `branches` also cover
|
||||
later conditions that must observe current header values. Older flattened VCL
|
||||
conversions need re-import from their original source to acquire branch metadata.
|
||||
|
||||
`rejected_protected` must produce import warnings and must not be activated.
|
||||
`rejected_unclosed` must reject the source. Other examples cover terminal
|
||||
actions, Cookie and `Vary` handling, TTL, grace and backend-response controls.
|
||||
|
||||
The Rust suite has focused tests for the related importer, policy/VCL and
|
||||
credential-cache behavior. Run them from the source root:
|
||||
|
||||
```bash
|
||||
cargo test --locked --lib cache::vcl_matrix_tests
|
||||
cargo test --locked --lib proxy::vcl_policy_matrix_tests
|
||||
cargo test --locked --lib proxy::cache_plan::credential_tests
|
||||
```
|
||||
|
||||
These Rust tests define their cases in source; they do not automatically load
|
||||
this fixture directory. To validate an actual deployment, also import the
|
||||
relevant VCL and send requests through the running binary.
|
||||
@@ -0,0 +1,538 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 2",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/toggle"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
},
|
||||
{
|
||||
"type": "allow_store"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 3",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-6",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 6",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/no-store"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "allow_store"
|
||||
},
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 2
|
||||
}
|
||||
],
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 10",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/response-pass"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-10-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 10",
|
||||
"stage": "response",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 5,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-11",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 11",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/private|^/origin-no-store|^/set-cookie|^/policy-no-store"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 6,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "allow_store"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 6
|
||||
}
|
||||
],
|
||||
"index": 7,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-14",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 14",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/drop-cookie"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 8,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "strip_set_cookie"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-14-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 14",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 8
|
||||
}
|
||||
],
|
||||
"index": 9,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-15",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 15",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/public-override"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 10,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "cache-control",
|
||||
"type": "set_backend_header",
|
||||
"value": "public, max-age=300"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-16",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 16",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 10
|
||||
}
|
||||
],
|
||||
"index": 11,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-18",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 18",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/response-stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 12,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-response-stop",
|
||||
"type": "set_backend_header",
|
||||
"value": "before"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-20",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 20",
|
||||
"stage": "response",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 12
|
||||
}
|
||||
],
|
||||
"index": 13,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-response-stop",
|
||||
"type": "set_backend_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-21",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 21",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 12
|
||||
}
|
||||
],
|
||||
"index": 14,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-After-Response-Stop",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-25",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 25",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 15,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-26",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver branch line 26",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/deliver-stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"index": 16,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Stop",
|
||||
"type": "set_header",
|
||||
"value": "before"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-28",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 28",
|
||||
"stage": "deliver",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 16
|
||||
}
|
||||
],
|
||||
"index": 17,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Stop",
|
||||
"type": "set_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-29",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 29",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 19,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 16
|
||||
}
|
||||
],
|
||||
"index": 18,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,252 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
},
|
||||
{
|
||||
"type": "allow_store"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/toggle"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 3",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "allow_store"
|
||||
},
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/no-store"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/response-pass"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 10",
|
||||
"stage": "response",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "allow_store"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/private|^/origin-no-store|^/set-cookie|^/policy-no-store"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "strip_set_cookie"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/drop-cookie"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-14",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 14",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "cache-control",
|
||||
"type": "set_backend_header",
|
||||
"value": "public, max-age=300"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/public-override"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-16",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 16",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-response-stop",
|
||||
"type": "set_backend_header",
|
||||
"value": "before"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/response-stop"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-20",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 20",
|
||||
"stage": "response",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-response-stop",
|
||||
"type": "set_backend_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/response-stop"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-21",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 21",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-After-Response-Stop",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-25",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 25",
|
||||
"stage": "deliver"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Stop",
|
||||
"type": "set_header",
|
||||
"value": "before"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/deliver-stop"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-28",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 28",
|
||||
"stage": "deliver",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Stop",
|
||||
"type": "set_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/deliver-stop"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-29",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 29",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
sub vcl_backend_response {
|
||||
if (bereq.url ~ "^/toggle") {
|
||||
set beresp.uncacheable = true;
|
||||
set beresp.uncacheable = false;
|
||||
}
|
||||
if (bereq.url ~ "^/no-store") {
|
||||
set beresp.uncacheable = false;
|
||||
set beresp.uncacheable = true;
|
||||
}
|
||||
if (bereq.url ~ "^/response-pass") { return(pass); }
|
||||
if (bereq.url ~ "^/private|^/origin-no-store|^/set-cookie|^/policy-no-store") {
|
||||
set beresp.uncacheable = false;
|
||||
}
|
||||
if (bereq.url ~ "^/drop-cookie") { unset beresp.http.Set-Cookie; }
|
||||
if (bereq.url ~ "^/public-override") {
|
||||
set beresp.http.Cache-Control = "public, max-age=300";
|
||||
}
|
||||
if (bereq.url ~ "^/response-stop") {
|
||||
set beresp.http.X-Response-Stop = "before";
|
||||
return(deliver);
|
||||
set beresp.http.X-Response-Stop = "after";
|
||||
}
|
||||
}
|
||||
sub vcl_deliver {
|
||||
set resp.http.X-After-Response-Stop = "yes";
|
||||
if (req.url ~ "^/deliver-stop") {
|
||||
set resp.http.X-Deliver-Stop = "before";
|
||||
return(deliver);
|
||||
set resp.http.X-Deliver-Stop = "after";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Skip",
|
||||
"negate": true,
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^b"
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Fallback",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"yes"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"any": [
|
||||
[]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "alpha"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "beta"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 1,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "other"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 7",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 2,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 9",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Class",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Seen",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-9-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 9",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 5,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 10",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 6,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 12",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 7,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "alpha"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Skip",
|
||||
"negate": true,
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "beta"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^b"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "beta"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Fallback",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"yes"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "beta"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Skip",
|
||||
"operator": "exists"
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^b"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "beta"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Skip",
|
||||
"operator": "exists"
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Fallback",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"yes"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "other"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"negate": true,
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^b"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Fallback",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"yes"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 7",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "set_request_header",
|
||||
"value": "other"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Skip",
|
||||
"operator": "exists"
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Mode",
|
||||
"negate": true,
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^b"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Fallback",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"yes"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-7-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 7",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Seen",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Class",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"alpha"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 9",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 10",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Class",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 12",
|
||||
"stage": "request"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
sub vcl_recv {
|
||||
if (req.http.X-Mode == "alpha" && !req.http.X-Skip) {
|
||||
set req.http.X-Class = "alpha";
|
||||
} elsif (req.http.X-Mode ~ "^b" || req.http.X-Fallback == "yes") {
|
||||
set req.http.X-Class = "beta";
|
||||
} else {
|
||||
set req.http.X-Class = "other";
|
||||
}
|
||||
if (req.http.X-Class == "alpha") { set req.http.X-Seen = "yes"; }
|
||||
return(hash);
|
||||
}
|
||||
sub vcl_hash { hash_data(req.http.X-Class); }
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 1",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 2,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "Cookie",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 2,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 1",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "Cookie",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 2",
|
||||
"stage": "request"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
sub vcl_recv { return(hash); }
|
||||
sub vcl_hash { hash_data(req.http.Cookie); }
|
||||
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Authorization",
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 3",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Cookie",
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "cookie_pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 2
|
||||
}
|
||||
],
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Authorization",
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "cookie_pass"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Cookie",
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
sub vcl_recv {
|
||||
if (req.http.Authorization) { return(pass); }
|
||||
if (req.http.Cookie) { return(cookie_pass); }
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"names": [
|
||||
"parent_analytics",
|
||||
"SESS*"
|
||||
],
|
||||
"type": "remove_named_cookies"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 3",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Cookie",
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 1
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"names": [
|
||||
"parent_analytics",
|
||||
"SESS*"
|
||||
],
|
||||
"type": "remove_named_cookies"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "Cookie",
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
sub vcl_recv {
|
||||
remove_req_cookies("parent_analytics", "SESS*");
|
||||
if (req.http.Cookie) { return(pass); }
|
||||
return(hash);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "strip_cookies"
|
||||
},
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 1,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "strip_cookies"
|
||||
},
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
sub vcl_recv {
|
||||
unset req.http.Cookie;
|
||||
return(hash);
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "X-Global-Request",
|
||||
"type": "set_request_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 4",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/global-pass"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 1
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "x-global-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 9",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/ttl-priority"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 60,
|
||||
"type": "ttl"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-9-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 9",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 5,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "X-Global-Delivery",
|
||||
"type": "set_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 12",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 6,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "X-Global-Request",
|
||||
"type": "set_request_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/global-pass"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "x-global-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 60,
|
||||
"type": "ttl"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/ttl-priority"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 9",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "global"
|
||||
},
|
||||
{
|
||||
"name": "X-Global-Delivery",
|
||||
"type": "set_header",
|
||||
"value": "global"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 12",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Req-Scope = "global";
|
||||
set req.http.X-Global-Request = "global";
|
||||
if (req.url ~ "^/global-pass") { return(pass); }
|
||||
}
|
||||
sub vcl_backend_response {
|
||||
set beresp.http.X-Beresp-Scope = "global";
|
||||
set beresp.http.X-Global-Response = "global";
|
||||
if (bereq.url ~ "^/ttl-priority") { set beresp.ttl = 60s; }
|
||||
}
|
||||
sub vcl_deliver {
|
||||
set resp.http.X-Deliver-Scope = "global";
|
||||
set resp.http.X-Global-Delivery = "global";
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "X-Remove",
|
||||
"type": "remove_request_header"
|
||||
},
|
||||
{
|
||||
"name": "X-Empty",
|
||||
"type": "set_request_header",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-6",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 6",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Req-Scope",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"local"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Seen",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-6-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 6",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 1
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "x-origin-remove",
|
||||
"type": "remove_backend_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 9",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 12",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "response_header",
|
||||
"name": "X-Beresp-Scope",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"local"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-seen",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 5,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "X-Origin-Deliver",
|
||||
"type": "remove_header"
|
||||
},
|
||||
{
|
||||
"name": "X-Empty-Response",
|
||||
"type": "set_header",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-15",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 15",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 7,
|
||||
"group": "g1",
|
||||
"index": 6,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "X-Req-Scope",
|
||||
"type": "set_request_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "X-Remove",
|
||||
"type": "remove_request_header"
|
||||
},
|
||||
{
|
||||
"name": "X-Empty",
|
||||
"type": "set_request_header",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Seen",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Req-Scope",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"local"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-6",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 6",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "x-beresp-scope",
|
||||
"type": "set_backend_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "x-origin-remove",
|
||||
"type": "remove_backend_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 9",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-beresp-seen",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "response_header",
|
||||
"name": "X-Beresp-Scope",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"local"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "first"
|
||||
},
|
||||
{
|
||||
"name": "X-Deliver-Scope",
|
||||
"type": "set_header",
|
||||
"value": "local"
|
||||
},
|
||||
{
|
||||
"name": "X-Origin-Deliver",
|
||||
"type": "remove_header"
|
||||
},
|
||||
{
|
||||
"name": "X-Empty-Response",
|
||||
"type": "set_header",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-15",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 15",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Req-Scope = "first";
|
||||
set req.http.X-Req-Scope = "local";
|
||||
unset req.http.X-Remove;
|
||||
set req.http.X-Empty = "";
|
||||
if (req.http.X-Req-Scope == "local") { set req.http.X-Seen = "yes"; }
|
||||
}
|
||||
sub vcl_backend_response {
|
||||
set beresp.http.X-Beresp-Scope = "first";
|
||||
set beresp.http.X-Beresp-Scope = "local";
|
||||
unset beresp.http.X-Origin-Remove;
|
||||
if (beresp.http.X-Beresp-Scope == "local") { set beresp.http.X-Beresp-Seen = "yes"; }
|
||||
}
|
||||
sub vcl_deliver {
|
||||
set resp.http.X-Deliver-Scope = "first";
|
||||
set resp.http.X-Deliver-Scope = "local";
|
||||
unset resp.http.X-Origin-Deliver;
|
||||
set resp.http.X-Empty-Response = "";
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-State",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"before"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"any": [
|
||||
[]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 3,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-State",
|
||||
"type": "set_request_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 3,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Wrong",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 3,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 1,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-State",
|
||||
"type": "set_request_header",
|
||||
"value": "after"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-State",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"before"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Wrong",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-State",
|
||||
"negate": true,
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"before"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
sub vcl_recv {
|
||||
if (req.http.X-State == "before") {
|
||||
set req.http.X-State = "after";
|
||||
} else {
|
||||
set req.http.X-Wrong = "yes";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 5,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flag",
|
||||
"type": "remove_request_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 5,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv branch line 4",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"negate": true,
|
||||
"operator": "exists"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 5,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Nested",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 5,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
},
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 2
|
||||
}
|
||||
],
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Tail",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 5,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flag",
|
||||
"type": "remove_request_header"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Nested",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"operator": "exists"
|
||||
},
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"negate": true,
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-4",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 4",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Tail",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "header",
|
||||
"name": "X-Flag",
|
||||
"operator": "exists"
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-5",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 5",
|
||||
"stage": "request"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
sub vcl_recv {
|
||||
if (req.http.X-Flag) {
|
||||
unset req.http.X-Flag;
|
||||
if (!req.http.X-Flag) { set req.http.X-Nested = "yes"; }
|
||||
set req.http.X-Tail = "yes";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Before",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"name": "X-After",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 1,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": [
|
||||
"line 3: request header authorization cannot be changed by cache rules",
|
||||
"line 4: request header host cannot be changed by cache rules"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Before",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
},
|
||||
{
|
||||
"name": "X-After",
|
||||
"type": "set_request_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 2",
|
||||
"stage": "request"
|
||||
}
|
||||
],
|
||||
"warnings": [
|
||||
"line 3: request header authorization cannot be changed by cache rules",
|
||||
"line 4: request header host cannot be changed by cache rules"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Before = "yes";
|
||||
set req.http.Authorization = "unsafe";
|
||||
set req.http.Host = "unsafe.example";
|
||||
set req.http.X-After = "yes";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"error": "line 2: unterminated string"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"error": "line 2: unterminated string"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Broken = "unterminated;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flow",
|
||||
"type": "set_request_header",
|
||||
"value": "before-hash"
|
||||
},
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Bucket",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 10",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-independent-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Independent-Deliver",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-13",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 13",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flow",
|
||||
"type": "set_request_header",
|
||||
"value": "before-hash"
|
||||
},
|
||||
{
|
||||
"type": "lookup"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Bucket",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 10",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-independent-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-12",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 12",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Independent-Deliver",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-13",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 13",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Flow = "before-hash";
|
||||
return(hash);
|
||||
set req.http.X-Flow = "after-hash";
|
||||
return(pass);
|
||||
}
|
||||
sub vcl_hash {
|
||||
hash_data(req.url);
|
||||
hash_data(req.http.Host);
|
||||
hash_data(req.http.X-Bucket);
|
||||
}
|
||||
sub vcl_backend_response { set beresp.http.X-Independent-Response = "yes"; }
|
||||
sub vcl_deliver { set resp.http.X-Independent-Deliver = "yes"; }
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flow",
|
||||
"type": "set_request_header",
|
||||
"value": "before-pass"
|
||||
},
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true,
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Bucket",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 7",
|
||||
"stage": "request",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-independent-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-8",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 8",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Independent-Deliver",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 9",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 4,
|
||||
"group": "g1",
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Flow",
|
||||
"type": "set_request_header",
|
||||
"value": "before-pass"
|
||||
},
|
||||
{
|
||||
"type": "pass"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-request-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_recv line 3",
|
||||
"stage": "request",
|
||||
"stop": true
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Bucket",
|
||||
"type": "hash_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"hash_stage": true,
|
||||
"id": "vcl-request-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_hash line 7",
|
||||
"stage": "request"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "x-independent-response",
|
||||
"type": "set_backend_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-8",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 8",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "X-Independent-Deliver",
|
||||
"type": "set_header",
|
||||
"value": "yes"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-9",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 9",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
sub vcl_recv {
|
||||
set req.http.X-Flow = "before-pass";
|
||||
return(pass);
|
||||
set req.http.X-Flow = "after-pass";
|
||||
return(hash);
|
||||
}
|
||||
sub vcl_hash { hash_data(req.http.X-Bucket); }
|
||||
sub vcl_backend_response { set beresp.http.X-Independent-Response = "yes"; }
|
||||
sub vcl_deliver { set resp.http.X-Independent-Deliver = "yes"; }
|
||||
@@ -0,0 +1,253 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 2",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/ttl"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 0,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 3",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 0
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-6",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 6",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/grace"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 2,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 3,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 2
|
||||
}
|
||||
],
|
||||
"index": 3,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-10",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 10",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/validation-no-store"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"index": 4,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 0,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-11",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 11",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 5,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-13",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response branch line 13",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"branches": [
|
||||
{
|
||||
"any": [
|
||||
[
|
||||
{
|
||||
"field": "status",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"304"
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
}
|
||||
],
|
||||
"index": 6,
|
||||
"version": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-13-2",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 13",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 8,
|
||||
"group": "g1",
|
||||
"guards": [
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 4
|
||||
},
|
||||
{
|
||||
"branch": 0,
|
||||
"entry": 6
|
||||
}
|
||||
],
|
||||
"index": 7,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 0,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/ttl"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-3",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 3",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 3,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/grace"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-7",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 7",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"seconds": 2,
|
||||
"type": "ttl"
|
||||
},
|
||||
{
|
||||
"seconds": 0,
|
||||
"type": "grace"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/validation-no-store"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-11",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 11",
|
||||
"stage": "response"
|
||||
},
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"type": "no_store"
|
||||
}
|
||||
],
|
||||
"conditions": [
|
||||
{
|
||||
"field": "url",
|
||||
"operator": "regex",
|
||||
"values": [
|
||||
"^/validation-no-store"
|
||||
]
|
||||
},
|
||||
{
|
||||
"field": "status",
|
||||
"operator": "equals",
|
||||
"values": [
|
||||
"304"
|
||||
]
|
||||
}
|
||||
],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-13",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 13",
|
||||
"stage": "response"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
sub vcl_backend_response {
|
||||
if (bereq.url ~ "^/ttl") {
|
||||
set beresp.ttl = 2s;
|
||||
set beresp.grace = 0s;
|
||||
}
|
||||
if (bereq.url ~ "^/grace") {
|
||||
set beresp.ttl = 2s;
|
||||
set beresp.grace = 3s;
|
||||
}
|
||||
if (bereq.url ~ "^/validation-no-store") {
|
||||
set beresp.ttl = 2s;
|
||||
set beresp.grace = 0s;
|
||||
if (beresp.status == 304) { set beresp.uncacheable = true; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "vary",
|
||||
"type": "set_backend_header",
|
||||
"value": "X-Language"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 1",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 1,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "vary",
|
||||
"type": "set_backend_header",
|
||||
"value": "X-Language"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 1",
|
||||
"stage": "response"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
sub vcl_backend_response { set beresp.http.Vary = "X-Language"; }
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "Vary",
|
||||
"type": "set_header",
|
||||
"value": "X-Public"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 1",
|
||||
"stage": "deliver",
|
||||
"vcl_flow": {
|
||||
"count": 1,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "Vary",
|
||||
"type": "set_header",
|
||||
"value": "X-Public"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-deliver-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_deliver line 1",
|
||||
"stage": "deliver"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
sub vcl_deliver { set resp.http.Vary = "X-Public"; }
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "vary",
|
||||
"type": "remove_backend_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 1",
|
||||
"stage": "response",
|
||||
"vcl_flow": {
|
||||
"count": 1,
|
||||
"group": "g1",
|
||||
"index": 0,
|
||||
"version": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"rules": [
|
||||
{
|
||||
"actions": [
|
||||
{
|
||||
"name": "vary",
|
||||
"type": "remove_backend_header"
|
||||
}
|
||||
],
|
||||
"conditions": [],
|
||||
"enabled": true,
|
||||
"id": "vcl-response-1",
|
||||
"match": "all",
|
||||
"name": "VCL vcl_backend_response line 1",
|
||||
"stage": "response"
|
||||
}
|
||||
],
|
||||
"warnings": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
sub vcl_backend_response { unset beresp.http.Vary; }
|
||||
Reference in new issue
Block a user