proxmox.go 394 B

12345678910111213141516171819202122
  1. package domainsniff
  2. import "net/http"
  3. /*
  4. Promox API sniffer
  5. This handler sniff proxmox API endpoint and
  6. adjust the request accordingly to fix shits
  7. in the proxmox API server
  8. */
  9. func IsProxmox(r *http.Request) bool {
  10. // Check if any of the cookies is named PVEAuthCookie
  11. for _, cookie := range r.Cookies() {
  12. if cookie.Name == "PVEAuthCookie" {
  13. return true
  14. }
  15. }
  16. return false
  17. }