feat: Route service API calls through /api proxy instead of hardcoded…#11939
Merged
feat: Route service API calls through /api proxy instead of hardcoded…#11939
Conversation
… URLs Removes hardcoded service URLs (API_GATEWAY_URL, AUTH_URL, CONFIG_API_URL, COUNTRY_CONFIG_URL, AUTH_API_URL) from window.config and replaces all direct service calls with relative /api/* paths routed through the nginx/vite proxy: - apolloClient: /api/graphql (was window.config.API_GATEWAY_URL/graphql) - client authApi: /api/auth/invalidateToken (was window.config.AUTH_URL) - login authApi: /api/auth/authenticate, /api/auth/verifyCode, /api/auth/verifyUser, /api/auth/verifyNumber, /api/auth/verifySecurityAnswer, /api/auth/resendAuthenticationCode, /api/auth/changePassword, /api/auth/sendUserName (were window.config.AUTH_API_URL) - login authApi: /api/config/publicConfig (was window.config.CONFIG_API_URL) - login referenceApi: /api/countryconfig/content/login (was window.config.COUNTRY_CONFIG_URL) - client referenceApi: /api/config/config, /api/config/publicConfig, /api/config/forms (were window.config.CONFIG_API_URL); /api/countryconfig/validators.js, /api/countryconfig/conditionals.js, /api/countryconfig/handlebars.js, /api/countryconfig/content/client (were window.config.COUNTRY_CONFIG_URL) Also adds explicit /api/auth/ and /api/config/ proxy blocks to both nginx configs and vite dev proxies (previously only /api/ catch-all existed), converts LANGUAGES from comma-separated string to string[] in window.config, and updates all tests and storybook previews accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
|
ℹ️ Coverage metrics explained: |
📊 commons test coverage |
📊 events test coverage |
Contributor
|
Your environment is deployed to https://ocrvs-11898.e2e-k8s.opencrvs.dev |
cibelius
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes hardcoded service URLs (API_GATEWAY_URL, AUTH_URL, CONFIG_API_URL, COUNTRY_CONFIG_URL, AUTH_API_URL) from window.config and replaces all direct service calls with relative /api/* paths routed through the nginx/vite proxy:
Also adds explicit /api/auth/ and /api/config/ proxy blocks to both nginx configs and vite dev proxies (previously only /api/ catch-all existed), converts LANGUAGES from comma-separated string to string[] in window.config, and updates all tests and storybook previews accordingly.
ToDo
LOGIN_URLDescription
Clearly describe what has been changed. Include relevant context or background.
Explain how the issue was fixed (if applicable) and the root cause.
Link this pull request to the GitHub issue (and optionally name the branch
ocrvs-<issue #>)Checklist