-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
modules/distribution/resources/operation_policies/specifications/ccAddHeader_v2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"category": "Mediation", | ||
"version": "v2", | ||
"displayName": "Add Header", | ||
"name": "ccAddHeader", | ||
"description": "This policy allows you to add a new header to the request", | ||
"policyAttributes": [ | ||
{ | ||
"name": "headerName", | ||
"displayName": "Header Name", | ||
"description": "Name of the header to be added", | ||
"validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$", | ||
"type": "String", | ||
"required": true | ||
}, | ||
{ | ||
"name": "headerValue", | ||
"displayName": "Header Value", | ||
"description": "Value of the header", | ||
"validationRegex": "^.+$", | ||
"type": "String", | ||
"required": true | ||
} | ||
], | ||
"applicableFlows": [ | ||
"request", | ||
"response" | ||
], | ||
"supportedGateways": [ | ||
"ChoreoConnect" | ||
], | ||
"supportedApiTypes": [ | ||
"HTTP" | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
modules/distribution/resources/operation_policies/specifications/ccMirrorRequest_v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"category": "Mediation", | ||
"name": "ccMirrorRequest", | ||
"version": "v1", | ||
"displayName": "Mirror Request", | ||
"description": "This policy allows you to mirror a request to various URLs", | ||
"policyAttributes": [ | ||
{ | ||
"name": "url", | ||
"displayName": "URL", | ||
"description": "URL to mirror the request to", | ||
"validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$", | ||
"type": "String", | ||
"required": true | ||
} | ||
], | ||
"applicableFlows": [ | ||
"request" | ||
], | ||
"supportedGateways": [ | ||
"ChoreoConnect" | ||
], | ||
"supportedApiTypes": [ | ||
"HTTP" | ||
] | ||
} |
34 changes: 34 additions & 0 deletions
34
modules/distribution/resources/operation_policies/specifications/ccRedirectRequest_v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"category": "Mediation", | ||
"name": "ccRedirectRequest", | ||
"version": "v1", | ||
"displayName": "Redirect Request", | ||
"description": "This policy allows you to redirect a request", | ||
"policyAttributes": [ | ||
{ | ||
"name": "url", | ||
"displayName": "URL", | ||
"description": "URL to redirect the request to", | ||
"validationRegex": "^(([\\w+]+\\:\\/\\/)?([\\w\\d-]+\\.)*[\\w-]+([\\.\\:]\\w+)*([\\/\\?\\=\\&\\#\\.]?[\\w-]+)*\\/?)$", | ||
"type": "String", | ||
"required": true | ||
}, | ||
{ | ||
"name": "statusCode", | ||
"displayName": "Status Code", | ||
"description": "Status code to display upon redirecting the request. Must be one of: 301, 302, 303, 307 or 308", | ||
"validationRegex": "^(301|302|303|307|308)$", | ||
"type": "String", | ||
"required": true | ||
} | ||
], | ||
"applicableFlows": [ | ||
"request" | ||
], | ||
"supportedGateways": [ | ||
"ChoreoConnect" | ||
], | ||
"supportedApiTypes": [ | ||
"HTTP" | ||
] | ||
} |
27 changes: 27 additions & 0 deletions
27
modules/distribution/resources/operation_policies/specifications/ccRemove_Header_v1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"category": "Mediation", | ||
"name": "ccRemoveHeader", | ||
"version": "v2", | ||
"displayName": "Remove Header", | ||
"description": "This policy allows you to remove a header from the request", | ||
"policyAttributes": [ | ||
{ | ||
"name": "headerName", | ||
"displayName": "Header Name", | ||
"description": "Name of the header to be removed", | ||
"validationRegex": "^([a-zA-Z_\\:][a-zA-Z\\d_\\-\\ ]*)$", | ||
"type": "String", | ||
"required": true | ||
} | ||
], | ||
"applicableFlows": [ | ||
"request", | ||
"response" | ||
], | ||
"supportedGateways": [ | ||
"ChoreoConnect" | ||
], | ||
"supportedApiTypes": [ | ||
"HTTP" | ||
] | ||
} |