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

Fix: Allow caching WP Rest API when helper plugin is activated. #5906

Merged

Conversation

jeawhanlee
Copy link
Contributor

Description

Return early when when WP Rest API is accessed and helper plugin is activated.

Fixes #5900

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Is the solution different from the one proposed during the grooming?

No

How Has This Been Tested?

Manual

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@jeawhanlee jeawhanlee added type: bug Indicates an unexpected problem or unintended behavior module: cache labels May 8, 2023
@jeawhanlee jeawhanlee self-assigned this May 8, 2023
@jeawhanlee jeawhanlee requested a review from a team May 8, 2023 10:42
@jeawhanlee jeawhanlee marked this pull request as ready for review May 8, 2023 10:42
@jeawhanlee jeawhanlee changed the title Return early with WP API Fix: Allow caching WP Rest API when helper plugin is activated. May 8, 2023
@vmanthos vmanthos self-requested a review May 9, 2023 11:09
inc/classes/Buffer/class-cache.php Outdated Show resolved Hide resolved
inc/classes/Buffer/class-cache.php Outdated Show resolved Hide resolved
@vmanthos
Copy link
Contributor

@jeawhanlee @piotrbak This is working as expected. 👍

A possible implication of the current PR is that redirects to add or remove the trailing / won't take place when wp-json is included in the URI. For example, for a post titled "What is /wp-json?" the URI will be https://example.com/what-is-wp-json.

Is there something we can/should do about this?

@piotrbak
Copy link
Contributor

@vmanthos We're good here, thanks!

@vmanthos vmanthos added this pull request to the merge queue May 12, 2023
Merged via the queue into develop with commit 8682be1 May 12, 2023
9 checks passed
@vmanthos vmanthos deleted the fix/5900-trailingslash-prevents-wp-rest-api-from-being-cached branch May 12, 2023 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cache type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trailingslash prevents WP Rest API from being cached
5 participants