Repository navigation
fix(bunny): keep API requests on their origin, release 0.10.2 - #77
Merged
Merged
Conversation
added 4 commits
December 4, 2026 10:09
WordPress sends the headers of a request again when it follows a redirect, whatever host it leads to, the AccessKey header included. The requests to the Bunny API now have their redirects followed by the package, only within https://api.bunny.net, up to five.
Both lead to a read, which writes nothing and whose success was taken for the write's. A write is now only followed through a 301, a 307 or a 308, which keep it a write.
It keeps PHPStan below 2.4, whose release breaks the quality gates.
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.
What changes
The requests of the image class export to the Bunny API no longer leave their redirects to WordPress.
https://api.bunny.net, up to five. Any other one is reported as a refusal.301,307or308. A302or303answered to a write is no longer reported as applied.Requests that are not redirected behave as before. No public API, configuration key or command changes.
Quality gates
The harness moves to v0.1.43, which keeps PHPStan below 2.4.
Release
The CHANGELOG is dated for 0.10.2: tag
v0.10.2on the merge commit.Tests
tests/Unit/WordPressBunnyPullZoneRedirectTest.phpcovers the redirects followed and refused, for reads and writes. TheWP_Errorstand-in of the tests gainsget_error_message().