Specify payload file using CLI arg for deliver.rb
This commit is contained in:
parent
329b818740
commit
5fe421046e
4
deliver.rb
Normal file → Executable file
4
deliver.rb
Normal file → Executable file
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
# https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/
|
||||
|
||||
require 'http'
|
||||
require 'openssl'
|
||||
|
||||
document = File.read('message')
|
||||
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}"
|
||||
|
|
Reference in a new issue