Add configurable API suffix - #8392
Merged
Merged
Conversation
sneridagh
marked this pull request as ready for review
July 22, 2026 08:01
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.
What changed
Adds a configurable API traversal suffix for Volto.
config.settings.apiSuffix, withRAZZLE_API_SUFFIXas its environment-variable counterpart.getApiSuffix()and uses it across API URL formatting, backend URL expansion, authenticated resource requests, and sitemap requests./++api++.apiSuffixprecedence overlegacyTraverse.RAZZLE_API_SUFFIX=''orapiSuffix: '') to intentionally omit traversal.RAZZLE_API_SUFFIXfromwindow.envso seamless-mode runtime configuration stays consistent between SSR and browser requests.@plone/voltoand@plone/types, and documents the new environment variable.Why
Volto currently chooses only between the fixed
/++api++suffix and no suffix throughlegacyTraverse.Deployments that expose the Plone API under another traversal suffix need a supported configuration option without relying on the legacy traversal switch.
Impact
Integrators can configure a nonstandard API traversal suffix through
config.settings.apiSuffixorRAZZLE_API_SUFFIX.The setting overrides
legacyTraversewhen present, while existing installations retain their current behavior when it is absent.Validation
pnpm --filter @plone/volto test --run src/helpers/Url/Url.test.js src/helpers/Api/Api.plone.rest.test.js src/helpers/Api/PloneBackendAPIResourceWithAuth.test.jspnpm --filter @plone/types check:tspnpm --filter @plone/volto check:tsstill reports existing unrelated typing errors in widget and Storybook files; no errors are associated with this change.