Currently, the gateway-extensions serves as a proxy to the jpa-server, managing both API requests to the jpa-server and implementing custom endpoints (/LocationHierarchy, /PractitionerDetails). While this setup seamlessly supports Android applications, it encounters issues when used with web applications (FHIR web).
Problem
Requests sent directly to the jpa-server return appropriate headers, including CORS headers. However, custom endpoints lack these headers, resulting in CORS errors on the FHIR web.
Previous Attempt
A solution was attempted at the Nginx level (PR #7982), which successfully added headers to custom endpoints but led to duplicate headers on non-custom FHIR endpoints, causing CORS errors on the FHIR web.
Proposed Solution
Handle the header issue at the gateway-extensions application level to ensure consistency in headers returned by both custom and non-custom FHIR endpoints.
Currently, the
gateway-extensions
serves as a proxy to thejpa-server
, managing both API requests to thejpa-server
and implementing custom endpoints (/LocationHierarchy
,/PractitionerDetails
). While this setup seamlessly supports Android applications, it encounters issues when used with web applications (FHIR web).Problem
Requests sent directly to the
jpa-server
return appropriate headers, including CORS headers. However, custom endpoints lack these headers, resulting in CORS errors on the FHIR web.Previous Attempt
A solution was attempted at the Nginx level (PR #7982), which successfully added headers to custom endpoints but led to duplicate headers on non-custom FHIR endpoints, causing CORS errors on the FHIR web.
Proposed Solution
Handle the header issue at the
gateway-extensions
application level to ensure consistency in headers returned by both custom and non-custom FHIR endpoints.