Skip to content

fix(bunny): keep API requests on their origin, release 0.10.2 - #77

Merged
ogorzalka merged 4 commits into
mainfrom
release/0.10.2
Dec 4, 2026
Merged

ogorzalka merged 4 commits into
mainfrom
release/0.10.2

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

What changes

The requests of the image class export to the Bunny API no longer leave their redirects to WordPress.

  • A redirect is followed only within https://api.bunny.net, up to five. Any other one is reported as a refusal.
  • A write is only followed through a 301, 307 or 308. A 302 or 303 answered 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.2 on the merge commit.

Tests

tests/Unit/WordPressBunnyPullZoneRedirectTest.php covers the redirects followed and refused, for reads and writes. The WP_Error stand-in of the tests gains get_error_message().

Pollora maintainer 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.
@ogorzalka
ogorzalka merged commit a5eee9b into main Dec 4, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant