Skip to content

Commit

Permalink
fix: remove set-cookie header
Browse files Browse the repository at this point in the history
  • Loading branch information
sargon64 committed Jul 27, 2023
1 parent 3422907 commit bfc36f3
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,7 @@ pub async fn user_auth(

let jwt = JWTAuth::new(user).encode(*KEY.clone());

let mut res = HttpResponse::Ok();
res.cookie(
actix_web::cookie::Cookie::build("jwt", jwt)
.path("/")
.secure(true)
.http_only(true)
.finish(),
);

res.finish()
HttpResponse::Ok().json(json!({ "jwt": jwt }))
}

#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down

0 comments on commit bfc36f3

Please sign in to comment.