Skip to content

Commit

Permalink
feat(schema): add preflight conditions
Browse files Browse the repository at this point in the history
other names considered and dismissed: delegate, preconditions

see adobe/helix-publish#349
  • Loading branch information
trieloff committed Oct 1, 2020
1 parent 2d87824 commit 6bf84bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/schemas/conditions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,18 @@
"^url_param\\..+[=]$": {
"type": ["number", "string"],
"description": "Matches a URL parameter's value as a number or string"
},
"^preflight\\..+[~]?$": {
"type": "string",
"description": "Matches a preflight response header value as a string"
},
"^preflight\\..+[<>]$": {
"type": "number",
"description": "Matches a preflight response header value as a number"
},
"^preflight\\..+[=]$": {
"type": ["number", "string"],
"description": "Matches a preflight response header value as a number or string"
}
}
}
6 changes: 6 additions & 0 deletions src/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
},
"strains": {
"$ref": "https://ns.adobe.com/helix/shared/strains"
},
"preflight": {
"type": "string",
"format": "uri",
"pattern": "^https://adobeioruntime\\.net/",
"description": "The URL of a preflight check that should be performed before assigning a strain to a request. The headers returned by this preflight request can be used in strain conditions."
}
},
"required": [
Expand Down

0 comments on commit 6bf84bd

Please sign in to comment.