Skip to content

Commit

Permalink
[Mobile] - Remove themes from supported endpoints (WordPress#63183)
Browse files Browse the repository at this point in the history
* Mobile - Remove themes from the allowed API endpoints due to an issue with the Android implementation

* React Native Editor - Update CHANGELOG

* Native API Fetch setup - Update comment for disabling the themes endpoint

Co-authored-by: geriux <geriux@git.wordpress.org>
Co-authored-by: dcalhoun <dpcalhoun@git.wordpress.org>
  • Loading branch information
3 people authored and huubl committed Jul 10, 2024
1 parent c54eaa5 commit a005a7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For each user feature we should also add a importance categorization label to i
- [*] Prevent hiding the keyboard when creating new list items [#62446]
- [*] Fix issue when pasting HTML content [#62588]
- [**] Add support prefix transforms [#62576]
- [*] Remove themes from supported endpoints [#63183]

## 1.120.1

Expand Down
8 changes: 7 additions & 1 deletion packages/react-native-editor/src/api-fetch-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import { applyFilters } from '@wordpress/hooks';
const SUPPORTED_METHODS = [ 'GET', 'POST' ];
// Please add only wp.org API paths here!
const SUPPORTED_ENDPOINTS = {
// Temporarily disabling themes endpoint calls within the editor.
// Issue: https://github.com/wordpress-mobile/WordPress-Android/issues/21034
// The editor's GET requests to the themes endpoint are not functioning as expected.
// This is likely due to the method used for performing GET requests within the host Android app.
// TODO: Investigate and resolve the issue with GET requests from the editor.
// Until then, themes endpoint calls are disabled to prevent unexpected behavior.
GET: [
/wp\/v2\/(media|categories|blocks|themes)\/?\d*?.*/i,
/wp\/v2\/(media|categories|blocks)\/?\d*?.*/i,
/wp\/v2\/search\?.*/i,
/oembed\/1\.0\/proxy\?.*/i,
],
Expand Down

0 comments on commit a005a7c

Please sign in to comment.