Skip to content

Commit

Permalink
Kong API changes for Discussion Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil-tarento authored Nov 3, 2023
1 parent da8ddd9 commit 95b4266
Showing 1 changed file with 115 additions and 23 deletions.
138 changes: 115 additions & 23 deletions ansible/roles/kong-api/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7747,29 +7747,6 @@ kong_apis:
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ small_request_size_limit }}"

- name: discussionHubAPIs
uris: "/discussion"
upstream_url: "{{ discussions_mw_url }}/discussion"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

- name: nodebbauthAPIs
uris: "/nodebb/auth/api"
Expand Down Expand Up @@ -10340,3 +10317,118 @@ kong_apis:
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ small_request_size_limit }}"

- name: discussionHubAPIForRecent
uris: "/discussion/recent"
upstream_url: "{{ discussions_mw_url }}/discussion/recent"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

- name: discussionHubAPIForTags
uris: "/discussion/tags "
upstream_url: "{{ discussions_mw_url }}/discussion/tags"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

- name: discussionHubAPIForUserDiscussions
uris: "/discussion/user"
upstream_url: "{{ discussions_mw_url }}/discussion/user"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

- name: discussionHubAPIForPost
uris: "/discussion/v2/topics"
upstream_url: "{{ discussions_mw_url }}/discussion/v2/topics"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

- name: discussionHubAPIForCategories
uris: "/discussion/categories"
upstream_url: "{{ discussions_mw_url }}/discussion/categories"
strip_uri: true
plugins:
- name: jwt
- name: cors
- "{{ statsd_pulgin }}"
- name: acl
config.whitelist:
- 'dataAccess'
- name: rate-limiting
config.policy: local
config.hour: "{{ large_rate_limit_per_hour }}"
config.limit_by: credential
- name: request-size-limiting
config.allowed_payload_size: "{{ medium_request_size_limit }}"
- name: request-transformer
config:
rename:
headers:
- nodebb_authorization_token:Authorization

0 comments on commit 95b4266

Please sign in to comment.