Draft
Conversation
a051ea4 to
682e0df
Compare
686ebf7 to
bbaf9c4
Compare
Member
Author
This comment was marked as outdated.
This comment was marked as outdated.
android/Gutenberg/src/main/java/org/wordpress/gutenberg/model/EditorConfiguration.kt
Show resolved
Hide resolved
android/Gutenberg/src/main/java/org/wordpress/gutenberg/GutenbergView.kt
Show resolved
Hide resolved
Include authorization header in AJAX requets, as we do not have cookies to send in the mobile app environment.
If we configure AJAX before loading the library, the configuration is overridden.
This global is often used by WordPress Admin page scripts.
Useful when needing to allow CORS for specific domains.
Address PR feedback about potential race condition. The code now checks if `window.wp.ajax.send` and `window.wp.ajax.post` are functions before wrapping them. This prevents TypeError when calling the wrapped function if the original method was undefined during configuration. Update tests to verify that missing methods remain undefined rather than being wrapped with an undefined reference. Co-authored-by: Claude <noreply@anthropic.com>
394bce2 to
ea73b3c
Compare
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.
Related:
@wordpress/api-fetchutility for GutenbergKit only Automattic/jetpack#45254What?
Authenticate AJAX requests with application passwords send via an authorization
header.
Why?
The GutenbergKit editor does not have authorization cookies, so we must rely
upon a different authorization mechanism.
Ref CMM-713. Close CMM-768.
How?
Set the
Authorizationheader viajQuery.ajaxSetupand by overloading thewindow.wp.ajaxutilities.Testing Instructions
Tip
Test using prototype builds from the sibling PRs:
Accessibility Testing Instructions
N/A, no navigation changes.
Screenshots or screencast
N/A, no visual changes.