From 2e614738f72c9af634c4a630693d06f144bc24df Mon Sep 17 00:00:00 2001 From: pdp8 Date: Wed, 12 Jul 2023 14:49:22 +0200 Subject: signed fetch for mastodon instances with AUTHORIZED_FETCH (e.g. mastodon.art) --- server.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'server.rb') diff --git a/server.rb b/server.rb index 11b6411..3263d9d 100644 --- a/server.rb +++ b/server.rb @@ -14,10 +14,11 @@ post '/inbox' do type = @activity['type'].downcase.to_sym p type halt 501 unless respond_to?(type) + # jj @activity @object = @activity['object'] @object = fetch(@object) if @object.is_a?(String) && @object.match(/^http/) halt 400 unless @object - verify! + # verify! unless type == :accept # pixelfed sends unsigned accept activities send(type) end @@ -41,6 +42,10 @@ end end end +get '/pdp8' do + send_file('./public/pdp8') +end + get '/tags/:tag' do |tag| ordered_collection(File.join(TAGS, tag)).to_json end -- cgit v1.2.3