aboutsummaryrefslogtreecommitdiff
path: root/registry/registry.go
diff options
context:
space:
mode:
Diffstat (limited to 'registry/registry.go')
-rw-r--r--registry/registry.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/registry/registry.go b/registry/registry.go
index eb53171..737ae5b 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -13,7 +13,6 @@ import (
"net/url"
"strings"
"sync"
- "time"
"git.capotej.com/capotej/communique/config"
"git.capotej.com/capotej/communique/models"
@@ -251,7 +250,7 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl *url.URL, follow vocab.Act
privKey := &keypair.PrivateKey
request, err := http.NewRequest("POST", url.String(), bytes.NewBuffer(jsonData))
- request.Header.Set("Date", time.Now().Format(http.TimeFormat))
+ // request.Header.Set("Date", time.Now().Format(http.TimeFormat))
request.Header.Set("Content-Type", "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"")
request.Header.Set("Host", url.Host)
@@ -276,8 +275,8 @@ func (r *Registry) deliverAcceptToInbox(url, actorUrl *url.URL, follow vocab.Act
prefs := []httpsig.Algorithm{httpsig.RSA_SHA256}
digestAlgorithm := httpsig.DigestSha256
// The "Date" and "Digest" headers must already be set on r, as well as r.URL.
- headersToSign := []string{httpsig.RequestTarget, "host", "digest", "content-type"}
- signer, _, err := httpsig.NewSigner(prefs, digestAlgorithm, headersToSign, httpsig.Signature, 0) // expires in 5 mins
+ headersToSign := []string{httpsig.RequestTarget, "host", "date", "digest", "content-type"}
+ signer, _, err := httpsig.NewSigner(prefs, digestAlgorithm, headersToSign, httpsig.Signature, 0)
if err != nil {
return err
}