Remove caddy simulation
This commit is contained in:
parent
8d6102c58f
commit
d0958d2366
3 changed files with 12 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue