web-v4.7.0

actix/actix-webweb-v4.7.0Jun 8, 2024by robjtede

AI Summary

This release introduces routing scoping, identity middleware, and compatibility features to assist in transitioning towards v5.0.

Key Highlights

  • Added `#[scope]` macro for grouping routes.
  • Added `middleware::Identity` type for user identification.
  • Added `compat-routing-macros-force-pub` feature (default on) to manage handler visibility.
  • Added `compat` crate feature group for v5.0 transition.
  • Implemented `From<Box<dyn ResponseError>>` for `Error`.

New Features

  • Added `#[scope]` macro.
  • Added `middleware::Identity` type.
  • Added `CustomizeResponder::add_cookie()` method.
  • Added `guard::GuardContext::app_data()` method.

Full Release Notes

### Added

- Add `#[scope]` macro.
- Add `middleware::Identity` type.
- Add `CustomizeResponder::add_cookie()` method.
- Add `guard::GuardContext::app_data()` method.
- Add `compat-routing-macros-force-pub` crate feature which (on-by-default) which, when disabled, causes handlers to inherit their attached function's visibility.
- Add `compat` crate feature group (on-by-default) which, when disabled, helps with transitioning to some planned v5.0 breaking changes, starting only with `compat-routing-macros-force-pub`.
- Implement `From<Box<dyn ResponseError>>` for `Error`.