aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-08-16 23:37:49 -0500
committerAnthony Wang2022-08-16 23:37:49 -0500
commite91762802199e6dddf27cf9a6bdad23cdd1b3a5f (patch)
treef2bbcb306f3e7c45fcfebf8c116cd46550b7f2e2
parent320e0457d891bdf134021e5996b1b7ea252758f2 (diff)
Add latest codeHEADmaster
-rwxr-xr-xdeliver.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/deliver.rb b/deliver.rb
index c3f04ce..496b921 100755
--- a/deliver.rb
+++ b/deliver.rb
@@ -8,9 +8,9 @@ require 'openssl'
document = File.read(ARGV[0])
date = Time.now.utc.httpdate
keypair = OpenSSL::PKey::RSA.new(File.read('private.pem'))
-signed_string = "(request-target): post /inbox\nhost: git.exozy.me\ndate: #{date}"
+signed_string = "(request-target): post /inbox\ndate: #{date}"
signature = Base64.strict_encode64(keypair.sign(OpenSSL::Digest::SHA256.new, signed_string))
-header = 'keyId="https://test.exozy.me/api/v1/activitypub/user/test#main-key",headers="(request-target) host date",signature="' + signature + '"'
+header = 'keyId="https://test.exozy.me/api/v1/activitypub/user/test#main-key",headers="(request-target) date",signature="' + signature + '"'
-HTTP.headers({ 'Host': 'git.exozy.me', 'Date': date, 'Signature': header })
+HTTP.headers({ 'Date': date, 'Signature': header })
.post('https://git.exozy.me/api/v1/activitypub/repo/Ta180m/Hello-world/inbox', body: document)