Skip to content

Commit f9d1d0a

Browse files
committed
fix: is_inertia_response helper and documentation
1 parent ddd8c94 commit f9d1d0a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/advanced/actix-web-implementations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ where
114114

115115
// If it's not a Inertia redirect or response, it might be assets response
116116
// then, reflash everything so that assets don't affect real user's requests
117-
let (prev_url, curr_url, optional_errors) = if !is_inertia_response(&req) {
117+
let (prev_url, curr_url, optional_errors) = if !is_inertia_response(&res) {
118118
(before_prev_url, prev_url, errors)
119119
} else {
120120
let inertia_session = req.extensions_mut().remove::<InertiaSessionToReflash>();

src/providers/actix_provider/facade.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ fn extract_inertia(req: &HttpRequest) -> &Inertia {
7373
}
7474
}
7575

76-
pub fn is_inertia_response(res: &ServiceResponse) -> bool {
76+
pub fn is_inertia_response<B: 'static>(res: &ServiceResponse<B>) -> bool {
7777
let headers = res.headers();
7878

7979
headers.get(X_INERTIA).is_some()

0 commit comments

Comments
 (0)