[pbs-devel] [PATCH proxmox] auth-api: set content type header for the new HttpOnly ticket endpoint
Shannon Sterz
s.sterz at proxmox.com
Thu Mar 13 10:50:08 CET 2025
otherwise some clients might struggle to interpret the body correctly
Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
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
--
2.39.5
More information about the pbs-devel
mailing list