We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d222b38 commit 8999148Copy full SHA for 8999148
application/src/response.rs
@@ -44,7 +44,6 @@ impl ApiResponse {
44
}
45
46
47
- #[inline]
48
pub fn new_serialized(body: impl serde::Serialize) -> Self {
49
let accept_header = ACCEPT_HEADER.try_with(|h| h.clone()).ok().flatten();
50
@@ -95,10 +94,13 @@ impl ApiResponse {
95
94
Self {
96
body,
97
status: axum::http::StatusCode::OK,
98
- headers: axum::http::HeaderMap::from_iter([(
99
- axum::http::header::CONTENT_TYPE,
100
- content_type,
101
- )]),
+ headers: axum::http::HeaderMap::from_iter([
+ (axum::http::header::CONTENT_TYPE, content_type),
+ (
+ axum::http::header::VARY,
+ axum::http::HeaderValue::from_static("Accept"),
102
+ ),
103
+ ]),
104
105
106
0 commit comments