From 3e382fd29cca7125294dc5d83c5a5e768b31a264 Mon Sep 17 00:00:00 2001 From: Shannon Sterz Date: Thu, 13 Mar 2025 10:50:08 +0100 Subject: [PATCH] auth-api: set content type header for the new HttpOnly ticket endpoint otherwise some clients might struggle to interpret the body correctly Signed-off-by: Shannon Sterz --- proxmox-auth-api/src/api/access.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxmox-auth-api/src/api/access.rs b/proxmox-auth-api/src/api/access.rs index 6dcda375..396935f5 100644 --- a/proxmox-auth-api/src/api/access.rs +++ b/proxmox-auth-api/src/api/access.rs @@ -140,7 +140,8 @@ fn create_ticket_http_only( .ok_or(format_err!("detected wrong RpcEnvironment type"))?; let mut ticket_response = handle_ticket_creation(create_params, env).await?; - let mut response = Response::builder(); + let mut response = + Response::builder().header(http::header::CONTENT_TYPE, "application/json"); // if `ticket_info` is set, we want to return the ticket in a `SET_COOKIE` header and not // the response body