Skip to content
Clone
8cc1265
8 lines 268 B Rust
use actix_web::http::header::{HeaderValue, SET_COOKIE};
use export::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);
}
}