summaryrefslogtreecommitdiff
path: root/server.rb
diff options
context:
space:
mode:
authorpdp8 <pdp8@pdp8.info>2023-07-12 14:49:22 +0200
committerpdp8 <pdp8@pdp8.info>2023-07-12 14:49:22 +0200
commit2e614738f72c9af634c4a630693d06f144bc24df (patch)
treebbd9bf6d227d8dfe9e131e3c1307b58693a8a431 /server.rb
parent7f38d569d8dd2491d1b9b8bc0ff1ae016b02f34f (diff)
signed fetch for mastodon instances with AUTHORIZED_FETCH (e.g. mastodon.art)
Diffstat (limited to 'server.rb')
-rw-r--r--server.rb7
1 files changed, 6 insertions, 1 deletions
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