update response to correctly carry headers through (#384)
* update response to correctly carry headers through
This commit is contained in:
parent
8c49ce396c
commit
b16d7c8aac
|
@ -53,6 +53,15 @@ impl Response {
|
|||
Self { extensions, ..self }
|
||||
}
|
||||
|
||||
/// Set the http headers of the response.
|
||||
#[must_use]
|
||||
pub fn http_headers(self, http_headers: HeaderMap<String>) -> Self {
|
||||
Self {
|
||||
http_headers,
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the cache control of the response.
|
||||
#[must_use]
|
||||
pub fn cache_control(self, cache_control: CacheControl) -> Self {
|
||||
|
|
|
@ -478,6 +478,7 @@ where
|
|||
Err(e) => Response::from_errors(vec![e]),
|
||||
}
|
||||
.extensions(extensions)
|
||||
.http_headers(std::mem::take(&mut *env.http_headers.lock()))
|
||||
}
|
||||
|
||||
/// Execute a GraphQL query.
|
||||
|
|
Loading…
Reference in New Issue
Block a user