- Added experimental proxmox fixes
- Fixed upstream error resp code not logging bug
This commit is contained in:
Toby Chui
2024-07-27 17:33:41 +08:00
parent c1e16d55ab
commit ca37bfbfa6
7 changed files with 144 additions and 50 deletions

View File

@@ -0,0 +1,21 @@
package domainsniff
import "net/http"
/*
Promox API sniffer
This handler sniff proxmox API endpoint and
adjust the request accordingly to fix shits
in the proxmox API server
*/
func IsProxmox(r *http.Request) bool {
// Check if any of the cookies is named PVEAuthCookie
for _, cookie := range r.Cookies() {
if cookie.Name == "PVEAuthCookie" {
return true
}
}
return false
}