bcgov / bcgov/entity

API Gateway verify CORS backend support

Open
#6,092 0 comments 0 reactions 1 assignee Claimed by @doug-lovett View on GitHub
apigw
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

Verify Apigee supports CORS headers when calling backend services, and that it is transparent to the gateway consumer. All gateway public facing proxies include CORS support. For background, see https://docs.apigee.com/api-platform/develop/adding-cors-support-api-proxy.

To verify a proxy works as expected when a registries backend service implements CORS, perform the following steps:

- [x] Modify test env mock target API proxy to add CORS headers to responses. Save, deploy.
- [x] Modify test env PPR proxy to remove CORS response headers as a new flow step which executes after the backend call. Save, deploy.
- [x] In Apigee start a trace session on the test env PPR proxy.
- [x] With a test client submit a PPR request to the test env.
- [x] Examine the Apigee trace session to verify the target (backend) CORS response headers from the mock service are present.
- [x] Examine the Apigee trace session to verify the new PPR proxy step removes the target CORS response headers before injecting the PPR proxy response headers.
- [x] Examine the client response to verify the CORS response headers generated from the gateway PPR proxy are correct.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.