Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MWPW-155317: [CaaS] add support for link rewriting #2889

Merged
merged 58 commits into from
Sep 18, 2024
Merged

Conversation

sanrai
Copy link
Contributor

@sanrai sanrai commented Sep 17, 2024

This PR adds support for link transformation in the CaaS (Content as a Service) component. It allows consuming projects to define a custom link transformer function that will be applied to links within the CaaS content.

This feature enables projects to dynamically transform links in CaaS content, which can be useful for staging environments, A/B testing, or other scenarios where URL modification is required.

Changes:

  • Add logic to pass the caasLinkTransformer function from the page config to the CaaS component configuration
  • Update the getConfig function to include the link transformer if defined
// In the consuming project's configuration
const config = {
  ...
  caasLinkTransformer: { } // settings defined inside here
};

Resolves: MWPW-155317

Test URLs:

@JackySun9 JackySun9 added run-nala-on-caas CaaS CaaS related code and removed caas-configurator CaaS Configurator CaaS CaaS related code run-nala-on-caas labels Sep 17, 2024
Copy link
Contributor

Reminder to set the Ready for Stage label - to queue this to get merged to stage & production.

@milo-pr-merge milo-pr-merge bot merged commit abcb834 into stage Sep 18, 2024
28 of 29 checks passed
@milo-pr-merge milo-pr-merge bot deleted the MWPW-155317 branch September 18, 2024 12:18
@milo-pr-merge milo-pr-merge bot mentioned this pull request Sep 18, 2024
@JackySun9 JackySun9 added caas-configurator CaaS Configurator and removed caas-configurator CaaS Configurator labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants