Skip to content

Commit

Permalink
Fix: Change auth ticket header to 'Cookie' for compatibility with Pro…
Browse files Browse the repository at this point in the history
…xmox VE 5.x and earlier
  • Loading branch information
mojtabamoaddab committed Nov 27, 2024
1 parent ea532c4 commit 8607880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxmox/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (s *Session) NewRequest(method, url string, headers *http.Header, body io.R
if s.AuthToken != "" {
req.Header["Authorization"] = []string{"PVEAPIToken=" + s.AuthToken}
} else if s.AuthTicket != "" {
req.Header["Authorization"] = []string{"PVEAuthCookie=" + s.AuthTicket}
req.Header["Cookie"] = []string{"PVEAuthCookie=" + s.AuthTicket}
req.Header["CSRFPreventionToken"] = []string{s.CsrfToken}
}
return
Expand Down

0 comments on commit 8607880

Please sign in to comment.