Skip to content

Commit

Permalink
Merge pull request #13498 from sgayangi/sgayangi-apk-policies
Browse files Browse the repository at this point in the history
[APK] Update policies supported for APK
  • Loading branch information
sgayangi authored Jul 29, 2024
2 parents 46266de + 5cab2f6 commit 33d1546
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"category": "Mediation",
"version": "v1",
"displayName": "Add Header",
"name": "apkAddHeader",
"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
@@ -1,6 +1,6 @@
{
"category": "Mediation",
"name": "ccCallInterceptorService",
"name": "apkCallInterceptorService",
"version": "v1",
"displayName": "Call Interceptor Service",
"description": "This policy allows you to call an interceptor service for a request message",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"category": "Mediation",
"name": "apkMirrorRequest",
"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": "apkRedirectRequest",
"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 either 301 or 302",
"validationRegex": "^(301|302)$",
"type": "Integer",
"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": "apkRemoveHeader",
"version": "v1",
"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 33d1546

Please sign in to comment.