diff options
author | pdp8 <pdp8@pdp8.info> | 2023-07-12 14:49:22 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-07-12 14:49:22 +0200 |
commit | 2e614738f72c9af634c4a630693d06f144bc24df (patch) | |
tree | bbd9bf6d227d8dfe9e131e3c1307b58693a8a431 /server.rb | |
parent | 7f38d569d8dd2491d1b9b8bc0ff1ae016b02f34f (diff) |
signed fetch for mastodon instances with AUTHORIZED_FETCH (e.g. mastodon.art)
Diffstat (limited to 'server.rb')
-rw-r--r-- | server.rb | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |