From f411fb66c70421066220795f3518cb62296bda36 Mon Sep 17 00:00:00 2001 From: shankaragoudab <140387294+shankaragoudab@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:06:04 +0530 Subject: [PATCH 1/2] added discussion report api --- ansible/roles/kong-api/defaults/main.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index ef96497b2e..aec14f9bd5 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -18851,3 +18851,21 @@ kong_apis: config.limit_by: credential - name: request-size-limiting config.allowed_payload_size: "{{ medium_request_size_limit }}" + + - name: reportDiscussion + uris: "{{ discussionfeed_prefix }}/report" + upstream_url: "{{ cb_discussion_service_url }}/discussion/report" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentCreate' + - name: rate-limiting + config.policy: local + config.hour: "{{ medium_rate_limit_per_hour }}" + config.limit_by: credential + - name: request-size-limiting + config.allowed_payload_size: "{{ medium_request_size_limit }}" From ee9982edb6d01d9c8ce8dcdc77f655896ed875b3 Mon Sep 17 00:00:00 2001 From: shankaragoudab <140387294+shankaragoudab@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:27:26 +0530 Subject: [PATCH 2/2] Update main.yml --- ansible/roles/kong-api/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index ba208a9944..3eb485ef88 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -18869,8 +18869,8 @@ kong_apis: config.hour: "{{ medium_rate_limit_per_hour }}" config.limit_by: credential - name: request-size-limiting - config.allowed_payload_size: "{{ medium_request_size_limit }}" - + config.allowed_payload_size: "{{ medium_request_size_limit }}" + - name: reportDiscussion uris: "{{ discussionfeed_prefix }}/report" upstream_url: "{{ cb_discussion_service_url }}/discussion/report" @@ -18887,4 +18887,4 @@ kong_apis: config.hour: "{{ medium_rate_limit_per_hour }}" config.limit_by: credential - name: request-size-limiting - config.allowed_payload_size: "{{ medium_request_size_limit }}" \ No newline at end of file + config.allowed_payload_size: "{{ medium_request_size_limit }}"