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

amp optimizer to support ampjs.org (not enabled as default) #1358

Merged
merged 1 commit into from
May 29, 2024

Conversation

powerivq
Copy link
Collaborator

This PR will enable the transformer to recognize ampjs.org as valid AMP CDN. However, it does not automatically change the CDN to ampjs.org. The default is still cdn.ampproject.org. To use ampjs.org, can override with ampUrlPrefix param.

Adds test cases to ensure script tags pointing to either CDN get rewritten to the CDN configured.

@danielrozenberg
Copy link
Member

I think we would want to eventually change this so that it defaults to whatever CDN is used in the page being optimized, instead of defaulting to cdn.ampproject.org. wdyt?

@powerivq
Copy link
Collaborator Author

@danielrozenberg I made it so that we only need to flip DEFAULT_AMP_CACHE_HOST to ampjs.org to achieve this. Once that is done, the transformer will change AMP docs containing either cdn.ampproject.org or ampjs.org into ampjs.org

@powerivq powerivq merged commit c7d6eae into main May 29, 2024
13 checks passed
@powerivq powerivq deleted the dual-domain branch May 29, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants