What's Changed
- Chore: Revert @koa/cors upgrade to 5.0.0 due to breaking cors middleware by @derrickmehaffy in #20041
Full Changelog: v4.22.0...v4.22.1
Tag Name: v4.22.1
Release Date: 4/5/2024
StrapiOpen-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.
Strapi v4.22.1 is a patch release that reverts the upgrade of the @koa/cors package to version 5.0.0, which was causing issues with the CORS middleware. This reversion ensures that the CORS functionality works correctly for all Strapi applications.
No migration steps are required for this update. Simply upgrade from v4.22.0 to v4.22.1 using your package manager:
npm install [email protected]
# or
yarn upgrade [email protected]
This is a highly recommended upgrade for all users currently on v4.22.0, especially if you're experiencing any CORS-related issues with your API. The update is a simple dependency reversion with no breaking changes or configuration adjustments required.
If you haven't yet upgraded to v4.22.0, you may want to skip directly to v4.22.1 to avoid the CORS issues altogether.
This release fixes an issue with the CORS middleware that was introduced in v4.22.0 when the @koa/cors package was upgraded to version 5.0.0. The upgrade caused the CORS middleware to malfunction, potentially preventing proper cross-origin requests to Strapi APIs.
The fix reverts the @koa/cors package to its previous compatible version, restoring proper CORS functionality for all Strapi applications.
Related issue: #20033
No new features were introduced in this patch release. This is strictly a bug fix release that reverts a problematic dependency upgrade.
No security fixes were included in this patch release.
No specific performance improvements were included in this patch release.
This patch release addresses a critical compatibility issue with the CORS middleware in Strapi v4.22.0. The previous version included an upgrade to @koa/cors 5.0.0 which broke cross-origin request functionality, potentially affecting any Strapi application that serves APIs to clients on different domains.
By reverting this dependency upgrade, v4.22.1 ensures that CORS functionality works as expected, allowing proper cross-origin API access. This is particularly important for applications that serve as backends for separate frontend applications or third-party services.
The fix requires no configuration changes or special handling during the upgrade process, making it a straightforward update for all users.
Full Changelog: v4.22.0...v4.22.1