Add header value as bytes directly.

This commit is contained in:
Kavin 2023-07-19 03:12:02 +01:00
parent 401d1ba1fe
commit 1dd4afdb16
No known key found for this signature in database
GPG Key ID: 6E4598CA5C92C41F
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
for (key, value) in resp.headers() {
if is_header_allowed(key.as_str()) {
response.append_header((key.as_str(), value.to_str()?));
response.append_header((key.as_str(), value.as_bytes()));
}
}