Remove caddy simulation

This commit is contained in:
cheddar 2025-02-20 23:12:04 -05:00
parent 8d6102c58f
commit d0958d2366
No known key found for this signature in database
3 changed files with 12 additions and 25 deletions

View file

@ -19,7 +19,7 @@ import (
"github.com/opencontainers/go-digest"
)
func Post(baseUrl *url.URL, key crypto.PrivateKey, keyId string, data []byte, simulateCaddy bool) (*http.Response, error) {
func Post(baseUrl *url.URL, key crypto.PrivateKey, keyId string, data []byte) (*http.Response, error) {
client, err := getSigningClient(key, keyId)
if err != nil {
@ -41,11 +41,6 @@ func Post(baseUrl *url.URL, key crypto.PrivateKey, keyId string, data []byte, si
req.Header.Add("Content-Digest", string(id.Algorithm())+"="+id.Encoded())
req.Header.Add("Content-Type", "application/json")
if simulateCaddy {
req.Header.Add("X-Forwarded-Method", req.Method)
req.Header.Add("X-Forwarded-Uri", req.RequestURI)
}
resp, err := client.Do(req)
return resp, err