Skip to content

Commit

Permalink
Update policies supported for APK
Browse files Browse the repository at this point in the history
  • Loading branch information
sgayangi committed Jun 26, 2024
1 parent f9e0982 commit 0a59e76
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 0 deletions.
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"
]
}
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"
]
}
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"
]
}
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"
]
}

0 comments on commit 0a59e76

Please sign in to comment.