@@ -161,19 +161,20 @@ pub trait ServiceBuilderExt<L>: sealed::Sealed<L> + Sized {
161
161
> ;
162
162
163
163
/// Follow redirect responses using the [`Standard`] policy,
164
- /// storing it as an extension
164
+ /// storing it as an extension.
165
165
///
166
- /// See [`tower_http::follow_redirect::extension `] for more details.
166
+ /// See [`tower_http::follow_redirect`] for more details.
167
167
///
168
- /// [`tower_http::follow_redirect::extension `]: crate::follow_redirect::extension
168
+ /// [`tower_http::follow_redirect`]: crate::follow_redirect
169
169
/// [`Standard`]: crate::follow_redirect::policy::Standard
170
170
#[ cfg( feature = "follow-redirect" ) ]
171
171
fn follow_redirects_extension (
172
172
self ,
173
173
) -> ServiceBuilder <
174
174
Stack <
175
- crate :: follow_redirect:: extension :: FollowRedirectExtensionLayer <
175
+ crate :: follow_redirect:: FollowRedirectLayer <
176
176
crate :: follow_redirect:: policy:: Standard ,
177
+ crate :: follow_redirect:: PolicyExtension ,
177
178
> ,
178
179
L ,
179
180
> ,
@@ -483,13 +484,18 @@ impl<L> ServiceBuilderExt<L> for ServiceBuilder<L> {
483
484
self ,
484
485
) -> ServiceBuilder <
485
486
Stack <
486
- crate :: follow_redirect:: extension :: FollowRedirectExtensionLayer <
487
+ crate :: follow_redirect:: FollowRedirectLayer <
487
488
crate :: follow_redirect:: policy:: Standard ,
489
+ crate :: follow_redirect:: PolicyExtension ,
488
490
> ,
489
491
L ,
490
492
> ,
491
493
> {
492
- self . layer ( crate :: follow_redirect:: extension:: FollowRedirectExtensionLayer :: new ( ) )
494
+ self . layer (
495
+ crate :: follow_redirect:: FollowRedirectLayer :: with_policy_extension (
496
+ crate :: follow_redirect:: policy:: Standard :: default ( ) ,
497
+ ) ,
498
+ )
493
499
}
494
500
495
501
#[ cfg( feature = "sensitive-headers" ) ]
0 commit comments