use actix_web::http::header::{HeaderValue, SET_COOKIE}; use api::http::Response; pub fn append_cookie(response: &mut Response, cookie: &str) { if let Ok(value) = HeaderValue::from_str(cookie) { response.headers_mut().append(SET_COOKIE, value); } }