fix: rewrite aem.page/aem.live image srcs in editor to prevent 401 errors #930
Open
andreituicu wants to merge 8 commits into
Open
fix: rewrite aem.page/aem.live image srcs in editor to prevent 401 errors #930andreituicu wants to merge 8 commits into
andreituicu wants to merge 8 commits into
Conversation
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.
Description
Images stored with *.aem.page or *.aem.live URLs now display correctly in the editor without triggering 401 errors.
When DA documents contain images served from AEM preview/publish hosts, the editor lacks the auth those hosts require. This PR rewrites those image URLs to their *.preview.da.live equivalent at render time via ProseMirror nodeViews — display-only, never written back to the document or synced via collab.
How Has This Been Tested?
Manually with: https://fximg--da-live--adobe.aem.live/edit#/andreituicu/da-test/mediabus
Screenshots (if appropriate):
The image with the cat is behind helix auth: https://main--da-test--andreituicu.aem.page/media_1222da127066e69ab4693b1aa98ad4cd6fdfe1fe4.jpg?width=2000&format=webply&optimize=medium
Types of changes
Checklist: