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 <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2025-03-13 10:50:08 +01:00 committed by Wolfgang Bumiller
parent b82e51f15a
commit 3e382fd29c

View File

@ -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