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

Add ability to deliver assets from byocdn domain #92

Closed
wants to merge 9 commits into from
Closed

Conversation

Copy link

aem-code-sync bot commented Aug 15, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link

@actinium15 actinium15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks foe this, @sdmcraft!

Do you think there's value in a reverse pattern as well? (where AEM Assets sidekick plugin has an additional configuration to specify the custom domain to include in the urls it adds to the doc, and the custom domain is swapped for delivery domain when the site is accessed from .hlx. domains)

@@ -5,7 +5,7 @@
"id": "asset-library",
"title": "AEM Assets Library",
"environments": ["edit"],
"url": "https://experience.adobe.com/solutions/CQ-assets-selectors/static-assets/resources/franklin/asset-selector.html",
"url": "https://experience.adobe.com/solutions/CQ-assets-selectors/static-assets/resources/franklin/asset-selector.html?extConfigUrl=https%3A%2F%2Fhelix-asset-selector-configs.netlify.app%2Fconfig-gems.json",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we could use Polaris urls for holding configs instead of relying on competitor 😅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Polaris now for delivering configs and works great 👍

@sdmcraft
Copy link
Collaborator Author

Do you think there's value in a reverse pattern as well? (where AEM Assets sidekick plugin has an additional configuration to specify the custom domain to include in the urls it adds to the doc, and the custom domain is swapped for delivery domain when the site is accessed from .hlx. domains)

That's a good idea indeed. It would mean less custom work, just specify the prod domain in AS config and the AS addon swaps the domains while copy pasting in Word doc itself. The assumption would be that you should only do this after you have setup the routing in byocdn to Polaris origin so that delivery urls with byocdn domain are able to deliver assets.

I think I can even omit swapping back to delivery urls as the asset delivery via byocdn would still work even for pages served from the internal hlx domains.

@actinium15
Copy link

The assumption would be that you should only do this after you have setup the routing in byocdn to Polaris origin so that delivery urls with byocdn domain are able to deliver assets.

...and we can forego that assumption if we implement a reverse of what this PR does (i.e., until byocdn is configured to front Polaris OOTB domain, the swapping will continue).

In my mind that'd mean lookup of img/picture/video tags in render-blocking won't be needed on 'production' websites - not sure if it is micro/meaningless optimization, though.

can even omit swapping back to delivery urls as the asset delivery via byocdn would still work even for pages served from the internal hlx domains.

+1, subject to the assumption above - though my hunch is that getting customer to implement the routing to Polaris domain in byocdn _before go-live/CDN-cutover to Franklin site_ might prove challenging.

@sdmcraft
Copy link
Collaborator Author

sdmcraft commented Aug 15, 2024

I am thinking slightly differently on this one. Basically have the same domain asset delivery as an "opt-in" else the default is as now i.e. assets get delivered for delivery-pXX-eYY.
Else for swapping back, we need to identify which urls needs rewrite (probably doable by looking at pattern like /adobe/assets/urn:aaid:aem.. ) and keep track of back to what (which delivery-pXX-eYY..) and also have some flag to indicate that byocdn is set and swap back is no longer needed. And to add to that, a requirement to add this swap back logic to any EDS site's git repo..

though my hunch is that getting customer to implement the routing to Polaris domain in byocdn before go-live/CDN-cutover to Franklin site might prove challenging

Yes, but I think we can't work around that since we are tackling this outside the the pipeline that generates the markup

Copy link

aem-code-sync bot commented Aug 15, 2024

Page Scores Audits Google
M /same-domain-delivery Unable to process request. Please wait a while and try again. PSI
D /same-domain-delivery Unable to process request. Please wait a while and try again. PSI

@sdmcraft
Copy link
Collaborator Author

Closing this and handling this on the Asset selector end wherein the authoring flow, the url copied over to Word/Google doc can be configured to have site's byocdn domain.

@sdmcraft sdmcraft closed this Aug 18, 2024
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.

3 participants